SendMail 에서 버전 12.1과 14.0의 차이점

모 안건에서 발생했던 문제점인데, SendMail/SmartReply/SmartForward에서 사용하는 Mime에 설정하는 데이터가 버전에 따라 다릅니다.

내가 착각을 했던게 서버의 버전에 맞춰야 하는줄 알았는데
클라이언트는 자신이 사용하는 버전을 request header 에 지정을 할 수가 있습니다.

MS-ASProtocolVersion헤더에 클라이언트가 사용하는 버전을 설정하는데
12.1의 경우는 Mime에 실제 Mime을 그대로 지정을 합니다.
대신에 request header 의 Content-Type에는 “message/rfc822″ 를 지정해야 합니다.

2.2.2.15 SendMail
The SendMail command is used by clients to send MIME-formatted email messages to the server. The body of the request differs depending on the value of the MS-ASProtocolVersion header, as specified in [MS-ASHTTP] section 2.2.1.1.2.4.
If the MS-ASProtocolVersion header is set to “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″.
If the MS-ASProtocolVersion header is set to “14.0” or “14.1”, the body of the SendMail request is WBXML data generated by using the XML elements specified in the table below.
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.19). 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.
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.

14.0의 경우는 현재 조사중….

This entry was posted in ActiveSync. Bookmark the permalink.