Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Users

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-23-2006, 09:23 PM
Intermediate Member
 
Posts: 15
Question AddMsgRequest ????

Dear all !

Now i am using <AddMsgRequest> to add an Message into Zimbra mail box.

It's easy if I add an simple message, but if it's an complex message, it's my problem :
-Message include attach file
-Message is a mail which have many part (Ex: reply mail)
-Message include image in mail
......

In <content> tag of <AddMsgRequest>, which can I put on it ? A Mime message or other Zimbra's tags ???? Now I am using string simlpe, and it's not easy to use.

Pls, anybody tell me how can i resolve it !
Reply With Quote
  #2 (permalink)  
Old 12-23-2006, 09:33 PM
Former Zimbran
 
Posts: 5,606
Default

Hi minhle,
Welcome to the Zimbra Forums.

Please do not post the same topic in more than one forum. It is very annoying, and makes it very difficult for users to search to find an answer.

As far as your question, I'm afraid I can't help you, but I'm sure one of our other competent members will help ya.

Happy holidays!
jh
Reply With Quote
  #3 (permalink)  
Old 12-24-2006, 12:08 AM
sam sam is offline
Zimbra Employee
 
Posts: 821
Default

If you construct the mime message you want to send, you can upload the MIME message using the FileUploadServlet (see fileupload.txt) then call AddMsgRequest using the token returned by the FileUploadServlet.
__________________
Sam Khavari

:: :: [ Zimbra ] :: :: [ Bugzilla ] :: :: [ Product Portal ] :: :: [ Wiki ] :: :: [ Downloads ] :: :: [ . ] ::
Reply With Quote
  #4 (permalink)  
Old 12-25-2006, 12:42 AM
Intermediate Member
 
Posts: 15
Default

Thanks Sam for our suggest.

Because I used DOM structure of Zimbra Interface to get data from Database, process it and packing into a message with many part. That's why I want to used an Mime object, which allow me process data in a message.

About FileUploadServlet, now I still can't understand how can it work. In fileupload.txt file, I just see HTML structure and there aren't any document describe or guide how can run it !

Please anyboy help me !
Reply With Quote
  #5 (permalink)  
Old 12-25-2006, 01:57 AM
sam sam is offline
Zimbra Employee
 
Posts: 821
Default

You build an HTTP request as described in fileupload.txt (which should refer you to rfc1867) and you POST it to http://<server>/service/upload?fmt=raw

The request would look similiar to this:

Code:
POST /service/upload HTTP/1.1 
Cookie: ZM_AUTH_TOKEN=0_6029... 
Content-Type: multipart/form-data; boundary=<MIME_BOUNDARY> 
Host: localhost:7070 
Content-Length: <REAL_CONTENT_LENGTH>
Connection: Keep-Alive 
Cache-Control: no-cache
Pragma: no-cache 

--<MIME_BOUNDARY> 
Content-Disposition: form-data; name="requestId"

<UNIQUE_CLIENT_ID> 
--<MIME_BOUNDARY> 
Content-Disposition: form-data; name="item-name"; filename="file.name" 
Content-Type: application/octet-stream 
Content-Transfer-Encoding: binary 

<...DATA..>
--<MIME_BOUNDARY>--
Of course, you should create an appropriate mime-boundary, insert the correct content-length and insert the appropriate data. You should set the content-type and transfer encoding appropriately as well.
__________________
Sam Khavari

:: :: [ Zimbra ] :: :: [ Bugzilla ] :: :: [ Product Portal ] :: :: [ Wiki ] :: :: [ Downloads ] :: :: [ . ] ::
Reply With Quote
  #6 (permalink)  
Old 12-25-2006, 08:42 AM
Intermediate Member
 
Posts: 15
Thumbs up

dear sam, with nearly 500 email need process with many format different, is this a good way ?

I can't understand file-upload.txt file and the way was descripted in this file. Which message hold the section in file-upload.txt and send it to server ?

With many file attach need upload to server, should I use this way ?

Could you show me a real short example of this upload files ?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.