共用方式為


2.2.3.3.1 AccountId (SendMail, SmartForward, SmartReply)

The AccountId element is an optional child element of the SendMail element in SendMail command requests, an optional child element of the SmartForward element in SmartForward command requests, and an optional child element of the SmartReply element in SmartReply command requests. In all contexts, it identifies the account from which an email is sent.

Elements referenced in this section are defined in the ComposeMail namespace, except where otherwise indicated by the presence of a namespace prefix (as defined in section 2.2.4).

Command request/response

Parent elements

Child elements

Data type

Number allowed

SendMail command request (section 2.2.1.17)

SendMail (section 2.2.3.162)

None

string ([MS-ASDTYPE] section 2.7)

0...1 (optional)

SmartForward command request (section 2.2.1.19)

SmartForward (section 2.2.3.169)

None

string

0...1 (optional)

SmartReply command request (section 2.2.1.20)

SmartReply (section 2.2.3.170)

None

string

0...1 (optional)

If the AccountId element is not present in the request, the server sends the email using the account identified by the settings:PrimarySmtpAddress element (section 2.2.3.138) returned in the Settings command response (section 2.2.1.18).

If AccountId is included in the request, the value MUST equal one of the settings:AccountId element values included in the Settings command response.

The server MUST validate that the AccountId element value provided is valid for sending email. A Status element (section 2.2.3.177) value of 166 is returned if the AccountId element value is not valid. A Status element value of 167 is returned if the account does not support sending email.

Note The server sends the email using the account specified by the AccountId element, and not the account specified by the From element ([MS-ASEMAIL] section 2.2.2.36).

Protocol Versions

The following table specifies the protocol versions that support this element. 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.6, or the Protocol version field, as specified in [MS-ASHTTP] section 2.2.1.1.1.1, in the request.

Protocol version

Element support, SendMail

Element support, SmartForward

Element support, SmartReply

2.5

12.0

12.1

14.0

14.1

Yes

Yes

Yes

16.0

Yes

Yes

Yes

16.1

Yes

Yes

Yes