Search in sources :

Example 6 with ParsedMessageOptions

use of com.zimbra.cs.mime.ParsedMessageOptions in project zm-mailbox by Zimbra.

the class Message method getParsedMessage.

public ParsedMessage getParsedMessage() throws ServiceException {
    ParsedMessage pm = null;
    mMailbox.lock.lock();
    try {
        // force the pm's received-date to be the correct one
        ParsedMessageOptions opt = new ParsedMessageOptions().setContent(getMimeMessage(false)).setReceivedDate(getDate()).setAttachmentIndexing(getMailbox().attachmentsIndexingEnabled()).setSize(getSize()).setDigest(getDigest());
        pm = new ParsedMessage(opt);
        return pm;
    } finally {
        mMailbox.lock.release();
    }
}
Also used : ParsedMessageOptions(com.zimbra.cs.mime.ParsedMessageOptions) ParsedMessage(com.zimbra.cs.mime.ParsedMessage)

Aggregations

ParsedMessage (com.zimbra.cs.mime.ParsedMessage)6 ParsedMessageOptions (com.zimbra.cs.mime.ParsedMessageOptions)6 Blob (com.zimbra.cs.store.Blob)3 DeliveryContext (com.zimbra.cs.mailbox.DeliveryContext)2 MailServiceException (com.zimbra.cs.mailbox.MailServiceException)2 Mailbox (com.zimbra.cs.mailbox.Mailbox)2 Message (com.zimbra.cs.mailbox.Message)2 MailboxBlob (com.zimbra.cs.store.MailboxBlob)2 MimeMessage (javax.mail.internet.MimeMessage)2 LmtpProtocolException (com.zimbra.common.lmtp.LmtpProtocolException)1 Rfc822ValidationInputStream (com.zimbra.common.mime.Rfc822ValidationInputStream)1 DeliveryServiceException (com.zimbra.common.service.DeliveryServiceException)1 ServiceException (com.zimbra.common.service.ServiceException)1 BufferStream (com.zimbra.common.util.BufferStream)1 CopyInputStream (com.zimbra.common.util.CopyInputStream)1 Account (com.zimbra.cs.account.Account)1 DeliveryOptions (com.zimbra.cs.mailbox.DeliveryOptions)1 Folder (com.zimbra.cs.mailbox.Folder)1 TargetConstraint (com.zimbra.cs.mailbox.MailItem.TargetConstraint)1 OperationContext (com.zimbra.cs.mailbox.OperationContext)1