Okay, for the past couple of days I have been investigating the user of the Zimbra Soap API, and so far I have been fairly successful. I can authenticate a user and send a message using SendMsgRequest with no problems. My problem occurs when I attempt to send a message with an attachment, it fails with the error NO SUCH ITEM. Not sure what I am doing wrong. According to the soap.txt file for SendMsgRequest, it has <attach><doc path="document-path"?>... I have tried this and I get an error.
The code is from a C# .Net application running on Windows 7 x64. Like I said, everything works except the attaching of the file. I am assuming that document-path is the LOCAL path and file name. Here is what my soap string looks like:
<?xml version="1.0" encoding="utf-8" ?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><format type="xml"/><authToken>MYAUTHTOKEN</authToken></context></soap:Header><soap:Body><SendMsgRequest xmlns="urn:zimbraMail"><m><e t="t" a="email@example.com" p="Name"/><su>Test email - with attachment</su><mp ct="text//plain"><content>Mail with attachment and CC</content></mp><attach><doc path="E:\attach.pdf"/></attach></m></SendMsgRequest></soap:Body></soap:Envelope>
Essentially, if I pull the attach stuff out the email sends no problem, but with it I get the error.