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 06-19-2007, 05:53 AM
Loyal Member
 
Posts: 97
Default Extracting Raw Email Message

I created a zimlet a few months ago and had to create a work around because of time constraints. I'm going to try to correct this workaround. My workaround is posted at Zimbra to PHP - ZimbraWiki

I want to extract the raw email, exactly like when you right click on an email and choose Show Original. I want this to be stuffed into a variable that I can _Post to another web site.

My work around was to extract it using REST (on Zimbra) and Curl (on external application). The only problem with this is passwords! My users cannot accept that when they change their password for Zimbra that they must change it in dotProject or erpAE.com.

I thought it would be easy to REST within my zimlet, extract the email and post it when the form is submitted. This has not proven easy to do. I think it's because I don't have a solid grasp on http requests in the Zimbra framework. If anyone has code, or can explain the code to pull this off, I would be very grateful, even willing to pay for the information. I've tried looking at several pieces of the zimbra source code and I'm getting close, but not there yet. I know its something simple that I'm missing.
__________________
EricX
Reply With Quote
  #2 (permalink)  
Old 06-19-2007, 07:58 AM
Zimlet Guru & Moderator
 
Posts: 467
Default

Quote:
Originally Posted by Ericx View Post
I created a zimlet a few months ago and had to create a work around because of time constraints. I'm going to try to correct this workaround. My workaround is posted at Zimbra to PHP - ZimbraWiki

I want to extract the raw email, exactly like when you right click on an email and choose Show Original. I want this to be stuffed into a variable that I can _Post to another web site.

My work around was to extract it using REST (on Zimbra) and Curl (on external application). The only problem with this is passwords! My users cannot accept that when they change their password for Zimbra that they must change it in dotProject or erpAE.com.

I thought it would be easy to REST within my zimlet, extract the email and post it when the form is submitted. This has not proven easy to do. I think it's because I don't have a solid grasp on http requests in the Zimbra framework. If anyone has code, or can explain the code to pull this off, I would be very grateful, even willing to pay for the information. I've tried looking at several pieces of the zimbra source code and I'm getting close, but not there yet. I know its something simple that I'm missing.
You might be able to get around the password restrictions by using a pre-auth request, and then constructing your own request.

As far as email goes, do you just want text/plain and text/html? Or do you want attachments et all?
Reply With Quote
  #3 (permalink)  
Old 06-19-2007, 08:01 AM
Loyal Member
 
Posts: 97
Default Email

Everything! Raw, exactly what you see in show original.
I know it has to do with my request or my proxy request. Trying to find the show original code but can't find it.
__________________
EricX

Last edited by Ericx; 06-19-2007 at 08:07 AM..
Reply With Quote
  #4 (permalink)  
Old 05-05-2008, 04:14 PM
New Member
 
Posts: 4
Default

Show Original Code is:

ZmDoublePaneController.prototype._showOrigListener =
function(ev) {
var msg = this._listView[this._currentView].getSelection()[0];
if (msg) {
var msgFetchUrl = this._appCtxt.getCsfeMsgFetcher() + "id=" + msg.id;
// create a new window w/ generated msg based on msg id
window.open(msgFetchUrl, "_blank", "menubar=yes,resizable=yes,scrollbars=yes");
}
};
Reply With Quote
  #5 (permalink)  
Old 05-05-2008, 04:16 PM
New Member
 
Posts: 4
Default

Get Message:

InputStream is = msg.getContentStream();
aString = parseISToString(is);
//got parseISToString() from internet
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.