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

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 02-14-2011, 01:55 PM
arw arw is offline
Active Member
 
Posts: 25
Default zimlets access ALL mail headers?

Is it possible to have access to all headers from a particular mail-message? For example through the ZmMailMsg object ...

I see how to request additional specific headers (ZmMailMsg.requestHeaders) however it would be useful for us to access all of the headers from a message in a Zimlet. I haven't been able to find a way to do this ... assuming it's possible.

As a fall back I thought maybe to access them through the SOAP client: 'com.zimbra.cs.client.*' however those classes (at least the ones that appear related to messages) don't seem to contain the necessary data.

thx
Reply With Quote
  #2 (permalink)  
Old 02-16-2011, 08:05 AM
Trained Alumni
 
Posts: 127
Default

You can use GetMsgRequest
<GetMsgRequest>
<m id="{msg-id}" [read="1"] [raw="1"] [max="{max-inlined-length}"] [html="1"] [neuter="0"] [part="{part}"]
[ridZ="YYYYMMDD[ThhmmssZ]"]
>
*(<header n="{header-name}/>)
</m>
</GetMsgRequest>

se the soap.txt
__________________
http://www.seacom.it
Reply With Quote
  #3 (permalink)  
Old 02-17-2011, 10:13 AM
arw arw is offline
Active Member
 
Posts: 25
Default

Thx for reply ...

* Edit
Nevermind the soap request seems to be basically working, I wasn't adding the proper urn:zimbraMail after the doc name.

... anyway:

Also it isn't preferable to need to make another request for this. It would still be better if we could get all the headers in the initial message load request. Maybe ZmMailMsg.requestHeaders could be made to accept a wildcard or something?

Last edited by arw; 02-17-2011 at 01:05 PM..
Reply With Quote
  #4 (permalink)  
Old 02-18-2011, 12:28 PM
arw arw is offline
Active Member
 
Posts: 25
Default

Using SOAP doesn't do it ...

You can get the message through SOAP but it's basically the same as using the JS API, you need to specify the headers to get. I'm hoping to just access all of them regardless of what they are. The headers that come through can vary and having to hardcode specifically which headers to request isn't the idea here ...

Sorry I maybe wasn't too clear on that before but you can already do everything through the JS api in this respect that you can through SOAP as far as I can tell.

Last edited by arw; 02-18-2011 at 02:40 PM..
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.