Platform SDK: Exchange 2000 Server

Send Method

[This is preliminary documentation and subject to change.]

The Send method sends the message.

[Visual Basic]
Sub Send()
[C++]
HRESULT Send();
[IDL]
HRESULT Send();

Remarks

How the message is sent depends upon 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 COM class implementation for a list of configuration settings used when sending messages.

The message must have at least one recipient, whether 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 wish to invalidate it and release the memory, you should release all outstanding references to the implementing object in the standard way.

Example

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"
Flds.Update

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

See Also

IMessage.Configuration, http://schemas.microsoft.com/cdo/configuration/sendusing, http://schemas.microsoft.com/cdo/configuration/sendusername, http://schemas.microsoft.com/cdo/configuration/sendpassword