Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
2.2.2.16 SendMail

2.2.2.16 SendMail

The SendMail command is used by clients to send MIME-formatted email messages to the server. The body of the request depends on the protocol version that is being used. See the details about protocol versions at the end of this section.

The ComposeMail namespace is the primary namespace for this section. Elements referenced in this section that are not defined in the ComposeMail namespace use the namespace prefixes defined in section 2.2.1.

The following table lists the elements that are used in SendMail command requests and responses.

Element name

Scope

Reference

SendMail

Request and Response

section 2.2.3.148

ClientId

Request

section 2.2.3.28.1

AccountId

Request

section 2.2.3.3.1

SaveInSentItems

Request

section 2.2.3.144

Mime

Request

section 2.2.3.99

Status

Response

section 2.2.3.162.13

The XML schema for the SendMail command request is described in section 6.33. The XML schema for the SendMail command response is described in section 6.34. If the message was sent successfully, the server returns an empty response.

HTTP/1.1 200 OK
Date: Thu, 03 Sep 2009 21:05:44 GMT
Content-Length: 0

Clients SHOULD NOT save messages directly to the local Sent Items folder; instead, clients SHOULD use the SaveInSentItems element (section 2.2.3.144) to automatically save the messages on the server. It is not possible to reconcile the local Sent Items folder with the server's Sent Items folder by using the Sync command (section 2.2.2.20). Items in the server's Sent Items folder can be added to the client by using the Sync command, but it is not possible to add items that are in the local Sent Items folder to the server.

Note that the From: MIME header in the outgoing message is set on the server to the primary email address of the authenticated user.

Protocol Versions

The following table specifies the protocol versions that support this command. The client indicates the protocol version being used by setting either the MS-ASProtocolVersion header, as specified in [MS-ASHTTP] section 2.2.1.1.2.4, or the Protocol version field, as specified in [MS-ASHTTP] section 2.2.1.1.1.1, in the request.

Protocol version

Command support

2.5

X

12.0

X

12.1

X

14.0

X

14.1

X

The body of the request differs as follows, depending on the protocol version being used by the client.

  • For protocol versions 2.5, 12.0, and 12.1, the body of the SendMail request is the MIME representation of the message to be sent. In this case, the client sets the Content-Type header to "message/rfc822".

  • For protocol versions 14.0 and 14.1, the body of the SendMail request is WBXML data generated by using the XML elements specified in the table of elements shown earlier in this section.

Show:
© 2015 Microsoft