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.
VistoPartner
Posts: 16
Joined: Fri Sep 12, 2014 11:56 pm

How to send New Email with Attachment using Zimbra API

Postby VistoPartner » Fri Feb 27, 2009 5:59 pm

Hi Guys,
I was trying to figure out how to send a new Email with attachment. When I looked at the soap.txt file, I saw that I have to upload the attachment first and then use the returned attachment-upload-ID for the SendMsgRequest.
I couldn't find any example or how to use the FileUploadServlet. Can anybody help me where to look for an example?
Thanks.


parin
Posts: 28
Joined: Sat Sep 13, 2014 3:06 am

How to send New Email with Attachment using Zimbra API

Postby parin » Thu Feb 28, 2013 1:49 am

I have same problem.. there is no guide how to upload and use that id in request... did you get the solution ??
13546dalmate
Outstanding Member
Outstanding Member
Posts: 360
Joined: Fri Sep 12, 2014 11:59 pm

How to send New Email with Attachment using Zimbra API

Postby 13546dalmate » Mon Mar 11, 2013 2:16 am

Hope you know how to use SOAP by java.

You can use 2 SOAP requests to do this thing: FileUploadServlet and SendMsgRequest.

In the first step, you use FileUploadServlet to upload your message to server and get message's id from FileUploadServlet's response.

In SendMsgRequest, it has an attribute aid, all you need is giving it message's id.
parin
Posts: 28
Joined: Sat Sep 13, 2014 3:06 am

How to send New Email with Attachment using Zimbra API

Postby parin » Tue Mar 12, 2013 6:44 am

thank you dalmate for your reply. i know there are two steps to upload a file on server. but it would be best if the sample code is available to upload any file to zimbra. i know how to send message and how to add attachment id v. but don't know the exact code example about how to upload it.
Thank You
parin
Posts: 28
Joined: Sat Sep 13, 2014 3:06 am

How to send New Email with Attachment using Zimbra API

Postby parin » Tue Apr 02, 2013 12:43 am

here is a link to a full documentation of zimbra soap API :- SOAP API Reference Material Beginning with ZCS 8.0 - Zimbra :: Wiki
13546dalmate
Outstanding Member
Outstanding Member
Posts: 360
Joined: Fri Sep 12, 2014 11:59 pm

How to send New Email with Attachment using Zimbra API

Postby 13546dalmate » Tue May 28, 2013 1:18 pm

[quote user="parin"]here is a link to a full documentation of zimbra soap API :- SOAP API Reference Material Beginning with ZCS 8.0 - Zimbra :: Wiki[/QUOTE]

If you want to upload file to Zimbra, don't use SOAP because Zimbra does not have this service.

I recommend you use httpupload to upload to this url: http[s]://yourdomain.com/service/upload
manawa
Posts: 5
Joined: Mon Feb 15, 2016 7:02 am

Re: How to send New Email with Attachment using Zimbra API

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

13546dalmate wrote:
In the first step, you use FileUploadServlet to upload your message to server and get message's id from FileUploadServlet's response.

.


Actually I don't get any ID from the FileUploadServlet's response.

The response I get is something like

Code: Select all

200, null, 2443203b-c634-4404-be27-d837c7f7fbb7:3fbf9648-7977-40f7-8ee0-f20119d6cdbf


with the last number being a server token I presume.

How to get the uploaded file ID please ?
manawa
Posts: 5
Joined: Mon Feb 15, 2016 7:02 am

Re: How to send New Email with Attachment using Zimbra API

Postby manawa » Thu Aug 04, 2016 7:37 am

parin wrote:thank you dalmate for your reply. i know there are two steps to upload a file on server. but it would be best if the sample code is available to upload any file to zimbra. i know how to send message and how to add attachment id v. but don't know the exact code example about how to upload it.
Thank You


Hello Parin,

Did you managed to get the upload working and get message's id from FileUploadServlet's response ?
Thanks

Return to “Developers”

Who is online

Users browsing this forum: No registered users and 1 guest