none
Issue in SENDMAIL COMMAND for Microsoft Exchange Server RRS feed

  • Question

  • Hi

    I am using SendMail command (Activesync Protocol) for sending an Email to microsoft exchange server, but I am not able to get any response from server. It says bad request as given below..

    HTTP/1.1 400 Bad Request..Cache
    -Control: private..Transfer-Enc
    oding: chunked..Content-Type: t
    ext/html..Server: Microsoft-IIS
    /7.0..X-AspNet-Version: 2.0.507
    27..X-Powered-By: ASP.NET..Date
    : Mon, 26 Sep 2011 05:00:15 GMT
    ....b..Bad Request

    The HTTP header  and XML body that i am using to send the request is given as below:-

    /////////////////HTTP/////////////////////

    strcat(httpheader,POST_NEW);

    strcat(httpheader,COMMAND);

    strcat(httpheader,CONTENT_TYPE_NEW);

    strcat(httpheader,AUTHORIZATION_NEW);

    strcat(httpheader,MS_ASPROTOCOLVERSION_NEW);

    strcat(httpheader,USER_AGENT_NEW);

    strcat(httpheader,X_MS_POLICEKEY_NEW);

    strcat(httpheader,s_Provision_response.policykey);

    strcat(httpheader,NEXTLINE_NEW);

    strcat(httpheader,HOST_NEW);

     

    strcat(httpheader,CONTENT_LENGTH_NEW);

     //////////////////XML//////////////////////// 

    strcat((

    char*)xmlbody,XMLHEADER_NEW);

    strcat((

    char*)xmlbody,"<SendMail xmlns=\"ComposeMail:\">\r\n");

    strcat((

    char*)xmlbody,"<ClientId>");

    strcat((

    char*)xmlbody,"1234");

    strcat((

    char*)xmlbody,"</ClientId>\r\n");

    strcat((

    char*)xmlbody,"<SaveInSentItems />\r\n");

    strcat((

    char*)xmlbody,"<Mime>");

    strcat((

    char*)xmlbody,"From: swarna.sathyanarayanana@sasken.com\r\n");

    strcat((

    char*)xmlbody,"To: swarna.sathyanarayanana@sasken.com\r\n");

    strcat((

    char*)xmlbody,"Cc:\r\n");

    strcat((

    char*)xmlbody,"Bcc:\r\n");

    strcat((

    char*)xmlbody,"Subject:\r\n");

    strcat((

    char*)xmlbody,"MIME-Version: 1.0\r\n");

    strcat((

    char*)xmlbody,"Content-Type: text/plain; charset=\"iso-8859-1\"\r\n");

    strcat((

    char*)xmlbody,"Content-Transfer-Encoding: 7bit\r\n");

    strcat((

    char*)xmlbody,"X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350\r\n");

    strcat((

    char*)xmlbody,"This is the Email body content.\r\n");

    strcat((

    char*)xmlbody,"</Mime>\r\n");

    strcat((

    char*)xmlbody,"</SendMail>");

     

    Plz find the byte sequence that I am writing to SSL:-

    50 4f 53 54 20 2f 4d 69 63 72 6f 73 6f 66 74 2d 53 65 72 76 65 72 2d 41 63 74 69 76 65 53 79

    6e 63 3f 55 73 65 72 3d 73 77 61 72 6e 61 73 26 44 65 76 69 63 65 49 64 3d 31 32 33 34 35 26

    44 65 76 69 63 65 54 79 70 65 3d 6d 79 70 63 26 43 6d 64 3d 53 65 6e 64 4d 61 69 6c 20 48 54

    54 50 2f 31 2e 31 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69

    6f 6e 2f 76 6e 64 2e 6d 73 2d 73 79 6e 63 2e 77 62 78 6d 6c 0d 0a 41 75 74 68 6f 72 69 7a 61

    74 69 6f 6e 3a 20 42 61 73 69 63 20 63 32 46 7a 61 32 56 75 58 48 4e 33 59 58 4a 75 59 58 4d

    36 4d 54 49 7a 51 48 4e 68 63 32 74 6c 62 67 3d 3d 0d 0a 4d 53 2d 41 53 50 72 6f 74 6f 63 6f

    6c 56 65 72 73 69 6f 6e 3a 20 31 32 2e 31 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 53 41 46

    0d 0a 58 2d 4d 53 2d 50 6f 6c 69 63 79 4b 65 79 3a 20 33 38 35 34 39 31 30 31 35 33 0d 0a 48

    6f 73 74 3a 20 6d 61 69 6c 2e 73 61 73 6b 65 6e 2e 63 6f 6d 0d 0a 43 6f 6e 74 65 6e 74 2d 4c

    65 6e 67 74 68 3a 20 32 30 38 0d 0a 45 78 70 65 63 74 3a 20 31 30 30 2d 63 6f 6e 74 69 6e 75

    65 0d 0a 0d 0a 03 01 6a 28 73 77 61 72 6e 61 2e 73 61 74 68 79 61 6e 61 72 61 79 61 6e 61 6e

    61 40 73 61 73 6b 65 6e 2e 63 6f 6d 00 4d 69 6d 65 00 00 15 45 51 03 31 32 34 38 00 01 48 03

    30 00 01 44 23 03 46 72 6f 6d 3a 20 00 83 00 03 0a 54 6f 3a 20 00 83 00 03 0a 43 63 3a 20 0a

    42 63 63 3a 20 0a 53 75 62 6a 65 63 74 3a 20 48 65 6c 6c 6f 0a 4d 49 4d 45 2d 56 65 72 73 69

    6f 6e 3a 20 31 2e 30 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 70 6c 61 69

    6e 3b 20 63 68 61 72 73 65 74 3d 22 69 73 6f 2d 38 38 35 39 2d 31 22 0a 43 6f 6e 74 65 6e 74

    2d 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 69 6e 67 3a 20 37 62 69 74 00 01 01

     

     

    I have gone through the Activesync command document..but it is not yet resolved.

    Plz help me out to resolve this issue

    Ramakant

    Monday, September 26, 2011 9:41 AM

Answers

  • Hi Ramakant,

     

    Please realize a new set of documents was published,
    http://msdn.microsoft.com/en-us/library/cc425499(v=EXCHG.80).aspx
    my references refer to v20110930.

    You asked the interpretation of the hex dump at the end of your original posting.

    As far as I see your message is correct syntactically, I was able to decode it. See my comments after the annotation about the problems.

    Please note that the dump is similar but different from what your program from the same posting would generate.

    E.g. in the program the ClientId is “1234”, in the dump “1248”;

        In the program save in the SentItems, in the dump your intension is not to save;

        The last two lines of the Mime content is missing from the dump.

     

    0000 50 4f 53 54 20 2f 4d 69 63 72 6f 73 6f 66 74 2d  |POST /Microsoft-

    0010 53 65 72 76 65 72 2d 41 63 74 69 76 65 53 79 6e  |Server-ActiveSyn

    0020 63 3f                                            |c?

    0022       55 73 65 72 3d 73 77 61 72 6e 61 73 26 44  |  User=swarnas&D

    0030 65 76 69 63 65 49 64 3d 31 32 33 34 35 26 44 65  |eviceId=12345&De

    0040 76 69 63 65 54 79 70 65 3d 6d 79 70 63 26 43 6d  |viceType=mypc&Cm

    0050 64 3d 53 65 6e 64 4d 61 69 6c 20 48 54 54 50 2f  |d=SendMail HTTP/

    0060 31 2e 31                                         |1.1

    0063          0d 0a

    0065                43 6f 6e 74 65 6e 74 2d 54 79 70  |     Content-Typ

    0070 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 76  |e: application/v

    0080 6e 64 2e 6d 73 2d 73 79 6e 63 2e 77 62 78 6d 6c  |nd.ms-sync.wbxml

    0090 0d 0a

    0092       41 75 74 68 6f 72 69 7a 61 74 69 6f 6e 3a  |  Authorization:

    00a0 20 42 61 73 69 63 20                             | Basic

    00a0                      63 32 46 7a 61 32 56 75 58  |       c2Fza2VuX  base64

    00b0 48 4e 33 59 58 4a 75 59 58 4d 36 4d 54 49 7a 51  |HN3YXJuYXM6MTIzQ 

    00c0 48 4e 68 63 32 74 6c 62 67 3d 3d                 |HNhc2tlbg==       sasken\swarnas:123@sasken

    00c0                                  0d 0a

    00c0                                        4d 53 2d  |             MS-

    00d0 41 53 50 72 6f 74 6f 63 6f 6c 56 65 72 73 69 6f  |ASProtocolVersio

    00e0 6e 3a 20 31 32 2e 31                             |n: 12.1

    00e7                      0d 0a

    00e9                            55 73 65 72 2d 41 67  |         User-Ag

    00f0 65 6e 74 3a 20 53 41 46                          |ent: SAF

    00f8                         0d 0a

    00fa                               58 2d 4d 53 2d 50  |          X-MS-P

    0100 6f 6c 69 63 79 4b 65 79 3a 20 33 38 35 34 39 31  |olicyKey: 385491

    0110 30 31 35 33                                      |0153

    0114             0d 0a

    0116                   48 6f 73 74 3a 20 6d 61 69 6c  |      Host: mail

    0120 2e 73 61 73 6b 65 6e 2e 63 6f 6d                 |.sasken.com

    012b                                  0d 0a

    012d                                        43 6f 6e  |             Con

    0130 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 32 30 38  |tent-Length: 208  the binary data

    0140 0d 0a

    0142       45 78 70 65 63 74 3a 20 31 30 30 2d 63 6f  |  Expect: 100-co

    0150 6e 74 69 6e 75 65                                |ntinue

     

    0156                   0d 0a 0d 0a

     

    015a                               03                 Version number - WBXML version 1.3

    015b                                  01              Unknown public identifier

    015c                                     6a           Charset = UTF-8

    015d                                        28        String table length

    015e                                           73 77  sw   (offset of 's' is zero)

    0160 61 72 6e 61 2e 73 61 74 68 79 61 6e 61 72 61 79  arna.sathyanaray

    0170 61 6e 61 6e 61 40 73 61 73 6b 65 6e 2e 63 6f 6d  anana@sasken.com

    0180 00 4d 69 6d 65 00                                 Mime

    0186                   00                             Switch Page ([MS-ASWBXML] 1.6)

    0187                      15                          ComposeMail: (2.1.2.1)

    0188                         45 = 40+05 40 www.w3.org/TR/wbxml Tag Code Space - tag followed by

                                            content and terminated by END token

                                            05 MS-ASWBXML 2.1.2.1.22 -

                                                          <SendMail>

    0189                            51 = 40+11 11 -         <ClientId> with content

    018a                               03 MS-ASWBXML 1.6 - STR_I

    018b                                  31 32 34 38 00      "1248"

    0190 01                                                 </ClientId>

    0191    48 = 40+08 -                                    <SaveInSentItems>

    0192       03 MS-ASWBXML 1.6 - STR_I

    0193          30 00                                       "0"

    0195                01                                  </SaveInSentItems>

    0196                   44 LITERAL_C with content

    0197                      23 String Table index         <Mime>

    0198                         03 STR_I

    0199                            46 72 6f 6d 3a 20 00      "From: "

    01a0 83 www.w3.org/TR/wbxml Global Tokens - STR_T

    01a1    00 String Table index                             "swarna.sathyanarayanana@sasken.com"

    01a2       03 MS-ASWBXML 1.6 - STR_I

    01a3          0a 54 6f 3a 20 00                           "\nTo: "

    01a9                            83 00 STR_T index         "swarna.sathyanarayanana@sasken.com"

    01ab                                  03 STR_I

    01ac                                     0a 43 63 3a      "\nCc:"

    01b0 20 0a 42 63 63 3a 20 0a 53 75 62 6a 65 63 74 3a      " \nBcc: \nSubject:"

    01c0 20 48 65 6c 6c 6f 0a 4d 49 4d 45 2d 56 65 72 73      "  Hello\nMIME-Vers"

    01d0 69 6f 6e 3a 20 31 2e 30 0a 43 6f 6e 74 65 6e 74      "ion: 1.0\nContent"

    01e0 2d 54 79 70 65 3a 20 74 65 78 74 2f 70 6c 61 69      "-Type: text/plai"

    01f0 6e 3b 20 63 68 61 72 73 65 74 3d 22 69 73 6f 2d      "n; charset="iso-"

    0200 38 38 35 39 2d 31 22 0a 43 6f 6e 74 65 6e 74 2d      "8859-1"\nContent-"

    0210 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 69 6e      "Transfer-Encodin"

    0220 67 3a 20 37 62 69 74 00                              "g: 7bit"

    0228                         01                         </Mime>

    0229                            01                    </SendMail>

     

    You are telling to the server MS-ASProtocolVersion is 12.1 and later you are using Code Page 21.

    Please note that this is not supported, see
    MS-ASWBXML  5 Appendix A: Product Behavior  page 40

    <57> Section 2.1.2.1.22: WBXML code page 21 is not supported when the MS-ASProtocolVersion header is set to 12.1.

    Let’s assume you used a higher number.

     

    Your dump does contain String table, its length is at offset 015d.

    MS-ASWBXML 2.1.3 Processing Rules says:

    “This algorithm does not use the following features that are specified in [WBXML1.2]:

        String tables

     

    Your dump contains starting at offset 0191:

    <SaveInSentItems>

     "0"

    </SaveInSentItems>

    This contradict to

    <xs:element name="SaveInSentItems" type="tns:EmptyTag" minOccurs="0"/>

    in MS-ASCMD 2.2.2.15.1 XSD for the SendMail command request.

    See a more detailed explanation in MS-ASCMD 2.2.3.134 SaveInSentItems:

    The SaveInSentItems element is an empty tag element, meaning it has no value or data type. It

    is distinguished only by the presence or absence of the <SaveInSentItems/> tag.

     

    Please let me know whether this annotation and explanation solved your problem.

    Feel free to ask more questions if you still have problem.

     

    Thanks, Vilmos

     

    Thursday, October 13, 2011 10:48 PM

All replies

  • Hi Ramakmi,

    Thank you for your question regarding SendMail.  One of the Open Specifications team will reply shortly to assist you.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Monday, September 26, 2011 11:15 AM
  • Hi Ramakmi,

    I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon.

    Thank you for your patience.

    Vilmos Foltenyi | Escalation Engineer

    Microsoft Open Specifications

     

     

    Tuesday, September 27, 2011 12:09 AM
  • Hi Vilmos

    Send mail command is working now..Only thing that i changed is the CONTENT TYPE in http header to

     

    Content-Type: message/rfc822\r\n..

    Earlier it was: Content-Type: application/vnd.ms-sync.wbxml\r\n

    Now i have a question that we are sending wbxml body to server then why we have to change content type to rfc822.

    Can you plz explain its significance.

    One more problem is there thet the mails that i am sending is not getting saved in sent items.

    I have used

    strcat((char*)xmlbody,"<SaveInSentItems />\r\n");

    in the xml body but even then it is not getting saved in send items.

    Can you give me an idea why it is like that..

    I am not able to send a normal text message also. Can u give me a prototypy for the MIME message.

    Thanks

    Ramakant

    • Edited by Ramakmi Wednesday, September 28, 2011 9:41 AM
    Wednesday, September 28, 2011 4:41 AM
  • Hi Ramakant,

     

    I’m glad that your “SendMail” command is working. First I would like to answer your last question and after return to the others.

    You asked for a prototype for SendMail, below is an example, what you can get by
    Start “Outlook Web App” choose “Options” and “See All Options” -> Phone -> Mobile Phones

    You should see your phone on the list, if not add the phone to it.

    Prepare an email on your phone.

    On the Options page click on Start Logging, click Yes to allow getting the log as attachment.

    Here is an example sending “ABCD EFGH” as text. (continued after the log)

     

    --------------------  Log Start -------------------------------------

    POST /Microsoft-Server-ActiveSync/default.eas?Cmd=SendMail&DeviceId=1D9A72F5F78EF0E59A808B24256CF049&DeviceType=WP&SaveInSent=T HTTP/1.1

    Cache-Control: no-cache

    Content-Length: 924

    Content-Type: application/vnd.ms-sync.wbxml

    Accept-Language: en-us

    Authorization: ********

    Host: mail.microsoft.com

    MS-ASProtocolVersion: 14.0

    X-MS-PolicyKey: 4167549173

     

    <?xml version="1.0" encoding="utf-8" ?>

    <SendMail xmlns="ComposeMail:">

          <SaveInSentItems/>

          <ClientId>oid{334:3}</ClientId>

          <Mime>MIME-Version: 1.0

    content-class:

    From: <vilmos@contoso.com>

    Subject: Test

    Date: Wed, 28 Sep 2011 18:11:40 -0700

    Importance: normal

    X-Priority: 3

    To: <tom@contoso.com>

    Content-Type: multipart/alternative;

          boundary="_CB2E6F27-8FE1-22AD-5E19-BB5D56CD8F4E_"

     

    --_CB2E6F27-8FE1-22AD-5E19-BB5D56CD8F4E_

    Content-Transfer-Encoding: quoted-printable

    Content-Type: text/plain; charset="Windows-1252"

     

    =0DABCD EFGH=0D=0DSent from my Windows Phone=

     

    --_CB2E6F27-8FE1-22AD-5E19-BB5D56CD8F4E_

    Content-Transfer-Encoding: quoted-printable

    Content-Type: text/html; charset="Windows-1252"

     

    <HTML><HEAD>

    <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dwindows-125=

    2"></HEAD>

    <BODY>

    <DIV style=3D"FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><BR>ABCD EF=

    GH<BR><BR>Sent from my Windows Phone</DIV></BODY></HTML>=

     

    --_CB2E6F27-8FE1-22AD-5E19-BB5D56CD8F4E_--

    </Mime>

    </SendMail>

    --------------------  Log End ---------------------------------------

     

    You can see the “<SaveInSentItems/>” tag in the log.

    In the log example the “Content-Type:” is the same what you used in your original posting.

    I don’t know why changing the “Content-Type:” solved your problem. My guess is that your wbxml is not correct. This needs more investigation.

     

    Thank you,

    Vilmos

     

    • Marked as answer by Ramakmi Thursday, October 13, 2011 5:38 AM
    • Unmarked as answer by Vilmos Foltenyi Thursday, October 13, 2011 10:44 PM
    Friday, September 30, 2011 12:32 AM
  • Hi Vilmos

    the <SaveInSentItems/> tag is not working. After sending an email i cannot see that mail in sent items folder.

     

    Do i need to change something to get it working(I am using my PC not mobile for activesync command)

     

    Regards

    Ramakant

    • Proposed as answer by Vilmos Foltenyi Thursday, October 13, 2011 10:44 PM
    • Unproposed as answer by Vilmos Foltenyi Thursday, October 13, 2011 10:45 PM
    Thursday, October 13, 2011 5:41 AM
  • Hi Ramakant,

     

    Please realize a new set of documents was published,
    http://msdn.microsoft.com/en-us/library/cc425499(v=EXCHG.80).aspx
    my references refer to v20110930.

    You asked the interpretation of the hex dump at the end of your original posting.

    As far as I see your message is correct syntactically, I was able to decode it. See my comments after the annotation about the problems.

    Please note that the dump is similar but different from what your program from the same posting would generate.

    E.g. in the program the ClientId is “1234”, in the dump “1248”;

        In the program save in the SentItems, in the dump your intension is not to save;

        The last two lines of the Mime content is missing from the dump.

     

    0000 50 4f 53 54 20 2f 4d 69 63 72 6f 73 6f 66 74 2d  |POST /Microsoft-

    0010 53 65 72 76 65 72 2d 41 63 74 69 76 65 53 79 6e  |Server-ActiveSyn

    0020 63 3f                                            |c?

    0022       55 73 65 72 3d 73 77 61 72 6e 61 73 26 44  |  User=swarnas&D

    0030 65 76 69 63 65 49 64 3d 31 32 33 34 35 26 44 65  |eviceId=12345&De

    0040 76 69 63 65 54 79 70 65 3d 6d 79 70 63 26 43 6d  |viceType=mypc&Cm

    0050 64 3d 53 65 6e 64 4d 61 69 6c 20 48 54 54 50 2f  |d=SendMail HTTP/

    0060 31 2e 31                                         |1.1

    0063          0d 0a

    0065                43 6f 6e 74 65 6e 74 2d 54 79 70  |     Content-Typ

    0070 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 76  |e: application/v

    0080 6e 64 2e 6d 73 2d 73 79 6e 63 2e 77 62 78 6d 6c  |nd.ms-sync.wbxml

    0090 0d 0a

    0092       41 75 74 68 6f 72 69 7a 61 74 69 6f 6e 3a  |  Authorization:

    00a0 20 42 61 73 69 63 20                             | Basic

    00a0                      63 32 46 7a 61 32 56 75 58  |       c2Fza2VuX  base64

    00b0 48 4e 33 59 58 4a 75 59 58 4d 36 4d 54 49 7a 51  |HN3YXJuYXM6MTIzQ 

    00c0 48 4e 68 63 32 74 6c 62 67 3d 3d                 |HNhc2tlbg==       sasken\swarnas:123@sasken

    00c0                                  0d 0a

    00c0                                        4d 53 2d  |             MS-

    00d0 41 53 50 72 6f 74 6f 63 6f 6c 56 65 72 73 69 6f  |ASProtocolVersio

    00e0 6e 3a 20 31 32 2e 31                             |n: 12.1

    00e7                      0d 0a

    00e9                            55 73 65 72 2d 41 67  |         User-Ag

    00f0 65 6e 74 3a 20 53 41 46                          |ent: SAF

    00f8                         0d 0a

    00fa                               58 2d 4d 53 2d 50  |          X-MS-P

    0100 6f 6c 69 63 79 4b 65 79 3a 20 33 38 35 34 39 31  |olicyKey: 385491

    0110 30 31 35 33                                      |0153

    0114             0d 0a

    0116                   48 6f 73 74 3a 20 6d 61 69 6c  |      Host: mail

    0120 2e 73 61 73 6b 65 6e 2e 63 6f 6d                 |.sasken.com

    012b                                  0d 0a

    012d                                        43 6f 6e  |             Con

    0130 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 32 30 38  |tent-Length: 208  the binary data

    0140 0d 0a

    0142       45 78 70 65 63 74 3a 20 31 30 30 2d 63 6f  |  Expect: 100-co

    0150 6e 74 69 6e 75 65                                |ntinue

     

    0156                   0d 0a 0d 0a

     

    015a                               03                 Version number - WBXML version 1.3

    015b                                  01              Unknown public identifier

    015c                                     6a           Charset = UTF-8

    015d                                        28        String table length

    015e                                           73 77  sw   (offset of 's' is zero)

    0160 61 72 6e 61 2e 73 61 74 68 79 61 6e 61 72 61 79  arna.sathyanaray

    0170 61 6e 61 6e 61 40 73 61 73 6b 65 6e 2e 63 6f 6d  anana@sasken.com

    0180 00 4d 69 6d 65 00                                 Mime

    0186                   00                             Switch Page ([MS-ASWBXML] 1.6)

    0187                      15                          ComposeMail: (2.1.2.1)

    0188                         45 = 40+05 40 www.w3.org/TR/wbxml Tag Code Space - tag followed by

                                            content and terminated by END token

                                            05 MS-ASWBXML 2.1.2.1.22 -

                                                          <SendMail>

    0189                            51 = 40+11 11 -         <ClientId> with content

    018a                               03 MS-ASWBXML 1.6 - STR_I

    018b                                  31 32 34 38 00      "1248"

    0190 01                                                 </ClientId>

    0191    48 = 40+08 -                                    <SaveInSentItems>

    0192       03 MS-ASWBXML 1.6 - STR_I

    0193          30 00                                       "0"

    0195                01                                  </SaveInSentItems>

    0196                   44 LITERAL_C with content

    0197                      23 String Table index         <Mime>

    0198                         03 STR_I

    0199                            46 72 6f 6d 3a 20 00      "From: "

    01a0 83 www.w3.org/TR/wbxml Global Tokens - STR_T

    01a1    00 String Table index                             "swarna.sathyanarayanana@sasken.com"

    01a2       03 MS-ASWBXML 1.6 - STR_I

    01a3          0a 54 6f 3a 20 00                           "\nTo: "

    01a9                            83 00 STR_T index         "swarna.sathyanarayanana@sasken.com"

    01ab                                  03 STR_I

    01ac                                     0a 43 63 3a      "\nCc:"

    01b0 20 0a 42 63 63 3a 20 0a 53 75 62 6a 65 63 74 3a      " \nBcc: \nSubject:"

    01c0 20 48 65 6c 6c 6f 0a 4d 49 4d 45 2d 56 65 72 73      "  Hello\nMIME-Vers"

    01d0 69 6f 6e 3a 20 31 2e 30 0a 43 6f 6e 74 65 6e 74      "ion: 1.0\nContent"

    01e0 2d 54 79 70 65 3a 20 74 65 78 74 2f 70 6c 61 69      "-Type: text/plai"

    01f0 6e 3b 20 63 68 61 72 73 65 74 3d 22 69 73 6f 2d      "n; charset="iso-"

    0200 38 38 35 39 2d 31 22 0a 43 6f 6e 74 65 6e 74 2d      "8859-1"\nContent-"

    0210 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 69 6e      "Transfer-Encodin"

    0220 67 3a 20 37 62 69 74 00                              "g: 7bit"

    0228                         01                         </Mime>

    0229                            01                    </SendMail>

     

    You are telling to the server MS-ASProtocolVersion is 12.1 and later you are using Code Page 21.

    Please note that this is not supported, see
    MS-ASWBXML  5 Appendix A: Product Behavior  page 40

    <57> Section 2.1.2.1.22: WBXML code page 21 is not supported when the MS-ASProtocolVersion header is set to 12.1.

    Let’s assume you used a higher number.

     

    Your dump does contain String table, its length is at offset 015d.

    MS-ASWBXML 2.1.3 Processing Rules says:

    “This algorithm does not use the following features that are specified in [WBXML1.2]:

        String tables

     

    Your dump contains starting at offset 0191:

    <SaveInSentItems>

     "0"

    </SaveInSentItems>

    This contradict to

    <xs:element name="SaveInSentItems" type="tns:EmptyTag" minOccurs="0"/>

    in MS-ASCMD 2.2.2.15.1 XSD for the SendMail command request.

    See a more detailed explanation in MS-ASCMD 2.2.3.134 SaveInSentItems:

    The SaveInSentItems element is an empty tag element, meaning it has no value or data type. It

    is distinguished only by the presence or absence of the <SaveInSentItems/> tag.

     

    Please let me know whether this annotation and explanation solved your problem.

    Feel free to ask more questions if you still have problem.

     

    Thanks, Vilmos

     

    Thursday, October 13, 2011 10:48 PM