Class MimeMessageWrapper

java.lang.Object
org.apache.ofbiz.service.mail.MimeMessageWrapper
All Implemented Interfaces:
Serializable

public class MimeMessageWrapper extends Object implements Serializable
See Also:
  • Constructor Details

    • MimeMessageWrapper

      public MimeMessageWrapper(javax.mail.Session session, javax.mail.internet.MimeMessage message)
    • MimeMessageWrapper

      public MimeMessageWrapper(javax.mail.Session session)
  • Method Details

    • setSession

      public void setSession(javax.mail.Session session)
      Sets session.
      Parameters:
      session - the session
    • getSession

      public javax.mail.Session getSession()
      Gets session.
      Returns:
      the session
    • setMessage

      public void setMessage(javax.mail.internet.MimeMessage message)
      Sets message.
      Parameters:
      message - the message
    • getMessage

      public javax.mail.internet.MimeMessage getMessage()
      Gets message.
      Returns:
      the message
    • getFirstHeader

      public String getFirstHeader(String header)
      Gets first header.
      Parameters:
      header - the header
      Returns:
      the first header
    • getHeader

      public String[] getHeader(String header)
      Get header string [ ].
      Parameters:
      header - the header
      Returns:
      the string [ ]
    • getFrom

      public javax.mail.Address[] getFrom()
      Get from address [ ].
      Returns:
      the address [ ]
    • getTo

      public javax.mail.Address[] getTo()
      Get to address [ ].
      Returns:
      the address [ ]
    • getCc

      public javax.mail.Address[] getCc()
      Get cc address [ ].
      Returns:
      the address [ ]
    • getBcc

      public javax.mail.Address[] getBcc()
      Get bcc address [ ].
      Returns:
      the address [ ]
    • getSubject

      public String getSubject()
      Gets subject.
      Returns:
      the subject
    • getMessageId

      public String getMessageId()
      Gets message id.
      Returns:
      the message id
    • getSentDate

      public Timestamp getSentDate()
      Gets sent date.
      Returns:
      the sent date
    • getReceivedDate

      public Timestamp getReceivedDate()
      Gets received date.
      Returns:
      the received date
    • getContentType

      public String getContentType()
      Gets content type.
      Returns:
      the content type
    • getMainPartCount

      public int getMainPartCount()
      Gets main part count.
      Returns:
      the main part count
    • getSubPartCount

      public int getSubPartCount(int index)
      Gets sub part count.
      Parameters:
      index - the index
      Returns:
      the sub part count
    • getAttachmentIndexes

      public List<String> getAttachmentIndexes()
      Gets attachment indexes.
      Returns:
      the attachment indexes
    • getMessageBody

      public String getMessageBody()
      Gets message body.
      Returns:
      the message body
    • getMessageBodyContentType

      public String getMessageBodyContentType()
      Gets message body content type.
      Returns:
      the message body content type
    • getMessageRawText

      public String getMessageRawText()
      Gets message raw text.
      Returns:
      the message raw text
    • getPartDescription

      public String getPartDescription(String index)
      Gets part description.
      Parameters:
      index - the index
      Returns:
      the part description
    • getPartContentType

      public String getPartContentType(String index)
      Gets part content type.
      Parameters:
      index - the index
      Returns:
      the part content type
    • getPartDisposition

      public String getPartDisposition(String index)
      Gets part disposition.
      Parameters:
      index - the index
      Returns:
      the part disposition
    • getPartFilename

      public String getPartFilename(String index)
      Gets part filename.
      Parameters:
      index - the index
      Returns:
      the part filename
    • getPartByteBuffer

      public ByteBuffer getPartByteBuffer(String index)
      Gets part byte buffer.
      Parameters:
      index - the index
      Returns:
      the part byte buffer
    • getPartText

      public String getPartText(String index)
      Gets part text.
      Parameters:
      index - the index
      Returns:
      the part text
    • getPartRawText

      public String getPartRawText(String index)
      Gets part raw text.
      Parameters:
      index - the index
      Returns:
      the part raw text
    • getPart

      public javax.mail.BodyPart getPart(String indexStr)
      Gets part.
      Parameters:
      indexStr - the index str
      Returns:
      the part
    • getContentText

      protected String getContentText(Object content)
      Gets content text.
      Parameters:
      content - the content
      Returns:
      the content text
    • getTextFromStream

      protected String getTextFromStream(InputStream stream)
      Gets text from stream.
      Parameters:
      stream - the stream
      Returns:
      the text from stream
    • getByteBufferFromStream

      protected ByteBuffer getByteBufferFromStream(InputStream stream)
      Gets byte buffer from stream.
      Parameters:
      stream - the stream
      Returns:
      the byte buffer from stream