Results 1 to 6 of 6

Thread: AddMsgRequest ????

  1. #1
    minhle3012 is offline Intermediate Member
    Join Date
    Nov 2006
    Posts
    15
    Rep Power
    8

    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 !

  2. #2
    jholder's Avatar
    jholder is offline Former Zimbran
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    20

    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

  3. #3
    sam
    sam is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    821
    Rep Power
    10

    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 ] :: :: [ . ] ::

  4. #4
    minhle3012 is offline Intermediate Member
    Join Date
    Nov 2006
    Posts
    15
    Rep Power
    8

    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 !

  5. #5
    sam
    sam is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    821
    Rep Power
    10

    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 ] :: :: [ . ] ::

  6. #6
    minhle3012 is offline Intermediate Member
    Join Date
    Nov 2006
    Posts
    15
    Rep Power
    8

    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 ?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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