Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 06-19-2007, 05:53 AM
Ericx Ericx is offline
Senior Member
 
Join Date: Jul 2006
Location: Virginia Beach, VA
ZCS Version: Release 5.0.2_GA_1976.RHEL4_20080130204528 RHEL4 NETWORK edition
Posts: 96
Ericx is on a distinguished road
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
JoshuaPrismon JoshuaPrismon is offline
Moderator
 
Join Date: Nov 2005
ZCS Version: Release 5.0.0_BETA2_1092.FC5_20070718124259 FC5_64 FOSS edition
Posts: 380
JoshuaPrismon is on a distinguished road
Send a message via AIM to JoshuaPrismon
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
Ericx Ericx is offline
Senior Member
 
Join Date: Jul 2006
Location: Virginia Beach, VA
ZCS Version: Release 5.0.2_GA_1976.RHEL4_20080130204528 RHEL4 NETWORK edition
Posts: 96
Ericx is on a distinguished road
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
frankh frankh is offline
Junior Member
 
Join Date: Mar 2008
Posts: 4
frankh is on a distinguished road
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
frankh frankh is offline
Junior Member
 
Join Date: Mar 2008
Posts: 4
frankh is on a distinguished road
Default

Get Message:

InputStream is = msg.getContentStream();
aString = parseISToString(is);
//got parseISToString() from internet
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.zimbra.com/forums/zimlets/9578-extracting-raw-email-message.html
Posted By For Type Date
Zimlets [Archive] - Zimbra - Forums This thread Refback 07-02-2007 03:24 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
need advice on configuring zimbra to work with fax server pheonix1t Administrators 0 07-11-2007 07:46 PM
One account not receving email EnglishDude Administrators 10 12-21-2006 12:32 PM
upgrade to 4.0.3 antispam does'nt work lucanannipieri Administrators 14 11-07-2006 02:56 AM
Email Message will not display jwilso2 Developers 2 01-04-2006 10:16 AM


freshmeat.net sourceforge.net The best Java IDE



 

Search Engine Optimization by vBSEO 3.0.0