Results 1 to 2 of 2

Thread: [SOLVED] Accessing a whole message in a Zimlet

  1. #1
    Join Date
    Jul 2006
    Location
    Stuttgart / Germany
    Posts
    223
    Rep Power
    9

    Default [SOLVED] Accessing a whole message in a Zimlet

    Hi all,

    I am currently writing a zimlet that solely works on email messages (not conversations) and encoutered the following problem:

    I want to access the mail message as a whole starting from the first line of the SMTP Header to the last line of the last mime attachement (in one string or stringbuffer). Just like what you get when you right click on a mail in the Webclient and select "Show Original".

    In my jsp I want to access the message like:

    Code:
    Mailbox mbox = MailboxManager.getInstance().getMailboxByAccountId(...);
    Message msg = mbox.getMessageById(...);
    Then I get the Subject with:

    Code:
    String subj = msg.getSubject();
    With other Mailbox methods I can access other parts of the mail. But how could I access the mail as one string?

    My java knowledge is pathetic and I would be really happy if someone could give me a hint...

    Regards
    Thomas

  2. #2
    Join Date
    Jul 2006
    Location
    Stuttgart / Germany
    Posts
    223
    Rep Power
    9

    Default

    Hi again,

    I found a way to access a mail "in one piece"

    Code:
    MailItem mItem = mbox.getItemById(oct, mid, TYPE_UNKNOWN);
    and now:
    Code:
    mItem.getContentStream()
    is what I want....

    Regards
    Thomas

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 09:06 AM
  2. Emails bouncing with "Error Text: 401,'null'"
    By sholden in forum Zimbra Connector for Outlook
    Replies: 27
    Last Post: 08-20-2008, 04:59 PM
  3. Outlook 2007 Beta error
    By bersrker in forum Zimbra Connector for Outlook
    Replies: 13
    Last Post: 07-17-2008, 07:38 AM
  4. Replies: 5
    Last Post: 01-11-2008, 04:34 AM
  5. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 10:38 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
  •