Results 1 to 2 of 2

Thread: Zimbra Soap API SendMsgRequest with Attachment

  1. #1
    Join Date
    Aug 2010
    Rep Power

    Default Zimbra Soap API SendMsgRequest with Attachment

    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=""><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="" 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.

  2. #2
    Join Date
    Sep 2011
    Rep Power


    Quote Originally Posted by chads View Post
    <attach><doc path="E:\attach.pdf"/></attach>
    This can't be right, how could the server possibly get to this file on your local "E" drive? I think you want to put the MIME-formatted upload directly between the <attach> tags, but I'm not very familiar with this.

Similar Threads

  1. soap sendmsgrequest question
    By dillchen in forum Developers
    Replies: 3
    Last Post: 07-12-2013, 02:38 AM
  2. Get attachment via SOAP
    By jcosta in forum Developers
    Replies: 1
    Last Post: 09-19-2012, 06:36 AM
  3. Is there a SOAP call to decode ms-tnef attachment ?
    By liverpoolfcfan in forum Developers
    Replies: 0
    Last Post: 08-10-2012, 08:35 AM
  4. Replies: 1
    Last Post: 06-27-2012, 07:10 PM
  5. Contact Image attachment SOAP
    By wolfroma in forum Developers
    Replies: 5
    Last Post: 02-05-2008, 10:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts