Results 1 to 5 of 5

Thread: Extracting Raw Email Message

  1. #1
    Join Date
    Jul 2006
    Location
    Virginia Beach, VA
    Posts
    97
    Rep Power
    9

    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

  2. #2
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    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?

  3. #3
    Join Date
    Jul 2006
    Location
    Virginia Beach, VA
    Posts
    97
    Rep Power
    9

    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.
    Last edited by Ericx; 06-19-2007 at 08:07 AM.
    EricX

  4. #4
    Join Date
    Mar 2008
    Posts
    4
    Rep Power
    7

    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");
    }
    };

  5. #5
    Join Date
    Mar 2008
    Posts
    4
    Rep Power
    7

    Default

    Get Message:

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

Similar Threads

  1. One account not receving email
    By EnglishDude in forum Administrators
    Replies: 12
    Last Post: 04-30-2010, 06:19 AM
  2. Email Message will not display
    By jwilso2 in forum Developers
    Replies: 3
    Last Post: 08-02-2009, 10:47 PM
  3. 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
  4. upgrade to 4.0.3 antispam does'nt work
    By lucanannipieri in forum Administrators
    Replies: 14
    Last Post: 11-07-2006, 02: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
  •