Send Method

Exchange Server 2003

Topic Last Modified: 2004-06-08

The Send method sends the message.

Sub Send()

How the message is sent depends on the current configuration. The configuration is defined in the associated Configuration object that is referenced by the Configuration property on this interface. Consult a specific Component Object Model (COM) class implementation for a list of configuration settings used when sending messages.

The message must have at least one recipient in the To, CC, or BCC property before it can be successfully sent.

The Send method does not invalidate this message after submitting it. If you want to invalidate the message and release the memory, you should release all outstanding references to the implementing object in the standard way.

' Reference to Microsoft ActiveX Data Objects 2.5 Library
' Reference to Microsoft CDO for Windows 2000 Library
Set iMsg = New CDO.Message
Dim iConf = New CDO.Configuration
Dim Flds as ADODB.Fields
Set Flds = iConf.Fields
Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer)      = "server"

With iMsg
 Set .Configuration         = iConf
     .MimeFormatted         = False
     .AutoGenerateTextBody  = False
     .To                    = ""
     .Subject               = "A short message"
     .TextBody              = "Text of this short message."
End With