Results 1 to 8 of 8

Thread: get/set email headers w/SOAP?

  1. #1
    atongen is offline Junior Member
    Join Date
    Oct 2006
    Posts
    6
    Rep Power
    8

    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

  2. #2
    atongen is offline Junior Member
    Join Date
    Oct 2006
    Posts
    6
    Rep Power
    8

    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?

  3. #3
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    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!

  4. #4
    atongen is offline Junior Member
    Join Date
    Oct 2006
    Posts
    6
    Rep Power
    8

    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

  5. #5
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    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!

  6. #6
    atongen is offline Junior Member
    Join Date
    Oct 2006
    Posts
    6
    Rep Power
    8

    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.

  7. #7
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default file-upload.txt

    It's actually file-upload.txt.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  8. #8
    atongen is offline Junior Member
    Join Date
    Oct 2006
    Posts
    6
    Rep Power
    8

    Default Got it.

    Thanks for your help.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 07:46 PM
  2. upgrade to 4.0.3 antispam does'nt work
    By lucanannipieri in forum Administrators
    Replies: 14
    Last Post: 11-07-2006, 03:56 AM

Posting Permissions

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