How to send New Email with Attachment using Zimbra API

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
manawa
Posts: 5
Joined: Mon Feb 15, 2016 7:02 am

How to send New Email with Attachment using Zimbra API

Postby manawa » Wed Aug 03, 2016 11:56 am

Hello.

I am trying to send an email with attachment through Zimbra SOAP API.
Following the documentation :
https://files.zimbra.com/docs/soap_api/8.0.6/soap-docs-806/api-reference/zimbraMail/SendMsg.html

It states that the attchment should be uploaded first using the FileUploadServlet. The resulting ID being then send in the SOAP request in the "aid" attribute.

But the documentation of the FileUploadServlet never states that an ID is returned:

ftp://ftp.lab.unb.br/pub/zimbra/zimbra/trunk/ZimbraServer/docs/file-upload.txt

I am actually getting the following response when uploading a file with FileUploadServlet:

Code: Select all

200,'null','2443203b-c634-4404-be27-d837c7f7fbb7:dab1aac0-b40a-48d9-a42e-786744a6143b'


The last number being a server token.

Response code is 200 so the request should have been processed successfully.

The question is: how to get the aid="{uploaded-MIME-body-ID}" from the FileUploadServlet ?

Thanks
For information, I am using the API from a Java application.


Return to “Developers”

Who is online

Users browsing this forum: No registered users and 1 guest