Share via


IHTTPMailTransport::SendMessage method

[IHTTPMailTransport::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 message using an HTTP server that supports RFC 821 sending.

Syntax

HRESULT SendMessage(
  [in] LPCSTR           pszPath,
  [in] LPCSTR           pszFrom,
  [in] LPHTTPTARGETLIST pTargets,
  [in] BOOL             fSaveInSent,
  [in] IStream          *pMessageStream,
  [in] DWORD            dwContext
);

Parameters

pszPath [in]

Type: LPCSTR

Specifies an LPCSTR that contains a null-terminated string that is the complete URL to the resource.

pszFrom [in]

Type: LPCSTR

Specifies an LPCSTR that contains the "from" address associated with the outbound mail. The address must be of the form mailbox@domain.extension.

pTargets [in]

Type: LPHTTPTARGETLIST

Specifies a pointer to the HTTPTARGETLIST structure that contains the list of email addresses that receive copies of the message. This list should include all direct recipients as well as copied (cc) and blind-copied (bcc) recipients. Addresses must be of the form: mailbox@domain.extension.

fSaveInSent [in]

Type: BOOL

Specifies a BOOL that indicates whether the server should save a copy of the outbound message in the user's Sent Items folder. The server determines the specific behavior associated with saving an outbound message.

pMessageStream [in]

Type: IStream*

Specifies a pointer to the IStream object that contains an RFC 822 compliant message. This method does not validate the contents of the stream. The caller is responsible for ensuring that the message is RFC 822 compliant.

dwContext [in]

Type: DWORD

Currently unused. Should be set to zero.

Return value

Type: HRESULT

Returns one of the following values.

Return code Description
S_OK
Indicates success.
E_INVALIDARG
Indicates that pszPath, pszFrom, pTargets, or pMessageStream is NULL.
E_OUTOFMEMORY
Indicates that an attempt to allocate memory failed.

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Product
Outlook Express 6.0
Header
Imnxport.h
IDL
Imnxport.idl
DLL
Inetcomm.dll (version 6.0 or later)