none
Unable to setup an email account using the Email2 CSP RRS feed

  • Question

  • Hi,

    I am trying to setup an email account on a Win10 device using the Email2 CSP. Below is the SyncML I am using for the same (As you can see I have added all mandatory nodes for this CSP)

    REQUEST

    <SyncML xmlns="SYNCML:SYNCML1.2">
       <SyncHdr>
          <VerDTD>1.2</VerDTD>
          <VerProto>DM/1.2</VerProto>
          <SessionID>3</SessionID>
          <MsgID>1</MsgID>
          <Target>
             <LocURI>urn:uuid:4FDBBD25-6899-53F2-B15A-BEDC704B8A23</LocURI>
          </Target>
          <Source>
             <LocURI>https://dhruvesh.agreeyamobility.net/api/v1/oma-dm/rs/syncml</LocURI>
          </Source>
       </SyncHdr>
       <SyncBody>
          <Status>
             <CmdID>1</CmdID>
             <MsgRef>1</MsgRef>
             <CmdRef>0</CmdRef>
             <Cmd>SyncHdr</Cmd>
             <TargetRef>urn:uuid:4FDBBD25-6899-53F2-B15A-BEDC704B8A23</TargetRef>
             <Data>212</Data>
          </Status>
          <Status>
             <CmdID>2</CmdID>
             <MsgRef>1</MsgRef>
             <CmdRef>2</CmdRef>
             <Cmd>Alert</Cmd>
             <Data>200</Data>
          </Status>
          <Status>
             <CmdID>3</CmdID>
             <MsgRef>1</MsgRef>
             <CmdRef>3</CmdRef>
             <Cmd>Alert</Cmd>
             <Data>200</Data>
          </Status>
          <Status>
             <CmdID>4</CmdID>
             <MsgRef>1</MsgRef>
             <CmdRef>4</CmdRef>
             <Cmd>Replace</Cmd>
             <Data>200</Data>
          </Status>
          <Add>
             <CmdID>1</CmdID>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">node</Format>
                </Meta>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/SERVICENAME</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>Yahoo</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/SERVICETYPE</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>IMAP4</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/ACCOUNTTYPE</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>Email</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/AUTHNAME</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>gazelle.lighthouse</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/AUTHREQUIRED</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>1</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/AUTHSECRET</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>{Password}</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/INSERVER</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>imap.mail.yahoo.com:993</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/NAME</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>Gazelle Lighthouse</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/OUTSERVER</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>smtp.mail.yahoo.com:465</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/REPLYADDR</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>gazelle.lighthouse@yahoo.com</Data>
             </Item>
             <Item>
                <Target>
                   <LocURI>./Vendor/MSFT/EMAIL2/%7Bab39136c-6deb-470c-aa9d-d3304e3784657%7D/SYNCINGCONTENTTYPES</LocURI>
                </Target>
                <Meta>
                   <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>2</Data>
             </Item>
          </Add>
          <Final />
       </SyncBody>
    </SyncML>

    RESPONSE

    <SyncML xmlns="SYNCML:SYNCML1.2">
       <SyncHdr>
          <VerDTD>1.2</VerDTD>
          <VerProto>DM/1.2</VerProto>
          <SessionID>3</SessionID>
          <MsgID>2</MsgID>
          <Target>
             <LocURI>https://dhruvesh.agreeyamobility.net/api/v1/oma-dm/rs/syncml</LocURI>
          </Target>
          <Source>
             <LocURI>urn:uuid:4FDBBD25-6899-53F2-B15A-BEDC704B8A23</LocURI>
          </Source>
       </SyncHdr>
       <SyncBody>
          <Status>
             <CmdID>1</CmdID>
             <MsgRef>1</MsgRef>
             <CmdRef>0</CmdRef>
             <Cmd>SyncHdr</Cmd>
             <Chal>
                <Meta>
                   <Format xmlns="syncml:metinf">b64</Format>
                   <Type xmlns="syncml:metinf">syncml:auth-md5</Type>
                   <NextNonce xmlns="syncml:metinf">i+sQRfVEm+vbxNsolPQgoXk4BX5LxWpXqn0rDYOesf4=</NextNonce>
                </Meta>
             </Chal>
             <Data>200</Data>
          </Status>
          <Status>
             <CmdID>2</CmdID>
             <MsgRef>1</MsgRef>
             <CmdRef>1</CmdRef>
             <Cmd>Add</Cmd>
             <Data>500</Data>
          </Status>
          <Final />
       </SyncBody>
    </SyncML>

    Can someone please help with the same ? I was unable to find any sample SyncML for Email2 CSP in MSDN documentation.

    Thanking you in anticipation.

    - Dhruvesh

    Tuesday, March 21, 2017 12:00 PM

Answers

  • FIXED.

    Issue was with the GUID. 

    A GUID should have format 8-4-4-4-12 and %7D %7B as prefix and suffix.

    It worked for me with %7BC556E16F-56C4-4edb-9C64-D9469EE1FBE0%7D

    P.S The example at MS link is wrong and is missing an extra 0, have requested MS to update their documentation.

    Thanks to Obaid for his help.

    - Dhruvesh

    Wednesday, April 19, 2017 8:26 AM