Share via


Send Method

Send Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Send method sends the message.

Applies To

IMessage Interface

IWorkflowMessage Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

[Visual Basic]Sub Send
()

[C++]HRESULT Send ();

Return Value

Returns S_OK if successful, or an error value otherwise.

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 Component Object Model (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 want to invalidate it and release the memory, you should release all outstanding references to the implementing object in the standard way.

Example

[Visual Basic]

Dim iMsg As New CDO.Message Dim iConf As 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@example.com" .Subject = "A short message" .TextBody = "Text of this short message." .Send End With

See Also

Configuration Property

sendusing Field

sendusername Field

sendpassword Field

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.