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

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 03-15-2007, 03:17 PM
Junior Member
 
Posts: 6
Default get/set email headers w/SOAP?

Is it possible to get and set email headers using soap in Zimbra? It seems like this should be possible, but I've looked through all the doco and forums and still can't find anything. The GetMessageRequest soap call doesn't return any custom email headers that may have been set, unless I am missing something.

Thanks in advance,
Andrew
Reply With Quote
  #2 (permalink)  
Old 03-15-2007, 03:40 PM
Junior Member
 
Posts: 6
Default set email headers w/SOAP

Actually, I can get the email headers by doing a GetMessageRequest with raw = 1. What I really need to be able to do is SET custom email headers using soap. The message object will then be sent using a SendMsgRequest call.

Anyone know how this could be done?
Reply With Quote
  #3 (permalink)  
Old 03-15-2007, 05:54 PM
Zimbra Employee
 
Posts: 1,434
Default Not sure you can...

I don't believe this is possible at present unless you generate the MIME body yourself. See soap.txt for how to call SendMsg on an already-generated MIME message.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #4 (permalink)  
Old 03-15-2007, 07:09 PM
Junior Member
 
Posts: 6
Default Already using SendMsgRequest

Quote:
Originally Posted by dkarp View Post
See soap.txt for how to call SendMsg on an already-generated MIME message.
This is what I have been using:

Code:
<SendMsgRequest [suid="{send-uid}"] [needCalendarSentByFixup="0|1"] [noSave="0|1
"]>
  <m [origid="..." rt="r|w"] [idnt="{identity-id}"]>
    <e t="{type}" a="{email-address}" p="{personal-name}" [add="1"]/>+
    <su>{subject}</su>*
    [<irt>{Message-ID header for message being replied to}</irt>]
    <mp ct="{content-type}">
      <content>...</content>
    </mp>
    <attach [aid="{attach-upload-id}"]>
      [<m id="{message-id}"/>]*
      [<mp mid="{message-id}" part="{part-id}"/>]*
      [<cn id="{contact-id}"/>]*
    </attach>
  </m>
</SendMsgRequest>
I already have a generated Mime message and it is sent and delivered perfectly with soap. I only need to insert 1 custom header before it is sent.

Maybe I am missing something, but I just don't see how to add a header into the message using the SendMsg call above. Also, I haven't seen any examples of how to do this when observing the Zimbra web client with the AJAX debugging window turned on (http://zimbra/zimbra/mail?mode=mjsf&gzip=false&debug=1).

Is something like this even possible?

Thanks again,
Andrew
Reply With Quote
  #5 (permalink)  
Old 03-15-2007, 09:43 PM
Zimbra Employee
 
Posts: 1,434
Default The other SendMsgRequest...

Use the other version of SendMsgRequest:
Code:
   or, if you want to compose the message remotely, upload it via
   FileUploadServlet, and submit it through our server:

<SendMsgRequest [suid="{send-uid}"] [needCalendarSentByFixup="0|1"]>
  <m aid="{uploaded-MIME-body-ID}" [origid="..." rt="r|w"]/>
</SendMsgRequest>
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #6 (permalink)  
Old 03-16-2007, 07:32 AM
Junior Member
 
Posts: 6
Default Oh, that one!

OK, thanks. I didn't realize you were referring to that SendMsgRequest.

By the way, I've tried looking at FileUploadServlet before, but I was never able to find the fileupload.txt file that is referenced in this thread.

Is this located in the source? I can't find it anywhere in zcs-4.5.3_GA_733.UBUNTU6.tgz. Probably not that big of a deal, it looks like it is just FileUpload from Jakarta Commons.
Reply With Quote
  #7 (permalink)  
Old 03-16-2007, 09:04 AM
Zimbra Employee
 
Posts: 1,434
Default file-upload.txt

It's actually file-upload.txt.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #8 (permalink)  
Old 03-16-2007, 09:43 AM
Junior Member
 
Posts: 6
Default Got it.

Thanks for your help.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

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.