Search code examples
c#activesync

ActiveSync SendMail - Staus Code 110 Returned


I am attempting to write a C# program to simulate an ActiveSync Device sending email via the SendMail command.

Each time I send the request to the exchange server...the response sends back status code 110 - Unknown Server Error

And in the Device Log I see the following exception:

--- Exception start --- Exception type: System.NotImplementedException Exception message: This kind of node should contain a blob, not a string Exception level: 0 Exception stack trace: at Microsoft.Exchange.AirSync.Wbxml.AirSyncBlobXmlNode.set_InnerText(String value) at Microsoft.Exchange.AirSync.Wbxml.WbxmlReader.FillXmlElement(XmlElement elem, Int32 depth, Boolean elemIsSecureData, Boolean elemIsBlobData) at Microsoft.Exchange.AirSync.Wbxml.WbxmlReader.FillXmlElement(XmlElement elem, Int32 depth, Boolean elemIsSecureData, Boolean elemIsBlobData) at Microsoft.Exchange.AirSync.Wbxml.WbxmlReader.ReadXmlDocument() at Microsoft.Exchange.AirSync.AirSyncRequest.get_XmlDocument() at Microsoft.Exchange.AirSync.Command.get_XmlRequest() at Microsoft.Exchange.AirSync.Command.WorkerThread() --- Exception end ---

My XML looks like this before WBXML encoding:

<?xml version="1.0" encoding="utf-8"?>
<SendMail xmlns="ComposeMail:">
  <ClientId>1234567890122525636247547456</ClientId>
  <Mime>From: [email protected]
To: [email protected]
Subject: Mail Subject
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Test body
</Mime>
</SendMail>

I can successfully issue Provision, FolderSync, Sync, and Setting commands but I can't figure out what I am doing wrong with this request call.

If anyone could point me in the right direction, I would really appreciate it.

Thank you in advance!


Solution

  • I found the answer to my question finally.

    The content of the mime tag needed to be CData not text.