Package org.compiere.util
Class EmailSrv.EmailContent
java.lang.Object
org.compiere.util.EmailSrv.EmailContent
- Enclosing class:
- EmailSrv
Manipulate from
Separate attached file to embed, attach, un-know list.
Message
Separate attached file to embed, attach, un-know list.
- Author:
- hieplq
-
Field Summary
Modifier and TypeFieldDescriptioncontain list from address.use to build content, to get content callgetHtmlContent(boolean)
List<javax.mail.BodyPart>
list attach fileList<javax.mail.BodyPart>
list embed fileList<javax.mail.Part>
list part unknown to processunique value. has max length is 998 charater http://tools.ietf.org/html/rfc4130#section-5.3.3use to build content, to get content callgetTextContent()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetHtmlContent
(boolean withEmbedImg) Get html content, when withEmbedImg = true, convert embedded image to base64 and embed to html content.ArrayList<javax.mail.BodyPart>
Get embedded image partsGet text content
-
Field Details
-
fromAddress
contain list from address. when @see javax.mail.Message#getFrom() return null, this list is empty -
messageID
unique value. has max length is 998 charater http://tools.ietf.org/html/rfc4130#section-5.3.3 -
subject
-
sentDate
-
textContentBuil
use to build content, to get content callgetTextContent()
-
htmlContentBuild
use to build content, to get content callgetHtmlContent(boolean)
-
lsAttachPart
list attach file -
lsEmbedPart
list embed file -
lsUnknowPart
list part unknown to process
-
-
Constructor Details
-
EmailContent
public EmailContent()
-
-
Method Details
-
getHtmlContent
public String getHtmlContent(boolean withEmbedImg) throws javax.mail.MessagingException, IOException Get html content, when withEmbedImg = true, convert embedded image to base64 and embed to html content.- Parameters:
withEmbedImg
-- Returns:
- return null when has empty content
- Throws:
Exception
javax.mail.MessagingException
IOException
-
getHTMLImageBodyParts
public ArrayList<javax.mail.BodyPart> getHTMLImageBodyParts() throws javax.mail.MessagingException, IOExceptionGet embedded image parts- Returns:
- Throws:
javax.mail.MessagingException
IOException
-
getTextContent
Get text content- Returns:
- return null when has no content
-