Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[ISMTPTransport::SendMessage is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
Sends a Simple Mail Transport Protocol (SMTP) message.
Syntax
HRESULT SendMessage(
[in] LPSMTPMESSAGE pMessage
);
Parameters
-
pMessage [in]
-
Type: LPSMTPMESSAGE
Specifies a pointer to the SMTPMESSAGE structure that contains the message to send.
Return value
Type: HRESULT
Returns one of the following values.
| Return code | Description |
|---|---|
|
Indicates success. |
|
Indicates that pMessage is NULL or that the message stream is NULL. |
|
Indicates that an attempt to allocate memory failed. |
|
Indicates that the transport is busy. |
|
Indicates that rInetAddrList contains invalid entries. |
|
Indicates that Connect has not been called or that the current connection has been lost. The transport does not automatically reconnect. |
|
Indicates that the server doesn't support DSN. |
Remarks
Connect must be called before this method and the transport must be in the ready state. When the message is finished or if an error ocurrs, OnResponse is called.
This method duplicates the contents of pMessage and adds a reference for pMessage->pstmMsg so that the client can free pMessage immediately after calling this method.
Requirements
| Minimum supported client |
Windows XP [desktop apps only] |
| Minimum supported server |
Windows Server 2003 [desktop apps only] |
| Product |
Outlook Express 6.0 |
| Header |
|
| IDL |
|
| DLL |
|