Package org.compiere.util
Class EmailSrv.EmailContent
- java.lang.Object
-
- org.compiere.util.EmailSrv.EmailContent
-
-
Field Summary
Fields Modifier and Type Field Description List<String>fromAddresscontain list from address.StringBuilderhtmlContentBuilduse to build content, to get content callgetHtmlContent(boolean)List<javax.mail.BodyPart>lsAttachPartlist attach fileList<javax.mail.BodyPart>lsEmbedPartlist embed fileList<javax.mail.Part>lsUnknowPartlist part unknow to processStringmessageIDunique value. has max length is 998 charater http://tools.ietf.org/html/rfc4130#section-5.3.3DatesentDateStringsubjectStringBuildertextContentBuiluse to build content, to get content callgetTextContent()
-
Constructor Summary
Constructors Constructor Description EmailContent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetHtmlContent(boolean withEmbedImg)get html content, when withEmbedImg = true, read embed image to base64 and embed to html contentArrayList<javax.mail.BodyPart>getHTMLImageBodyParts()StringgetTextContent()get text content
-
-
-
Field Detail
-
fromAddress
public List<String> fromAddress
contain list from address. when @see javax.mail.Message#getFrom() return null, this list is empty
-
messageID
public String messageID
unique value. has max length is 998 charater http://tools.ietf.org/html/rfc4130#section-5.3.3
-
subject
public String subject
-
sentDate
public Date sentDate
-
textContentBuil
public StringBuilder textContentBuil
use to build content, to get content callgetTextContent()
-
htmlContentBuild
public StringBuilder htmlContentBuild
use to build content, to get content callgetHtmlContent(boolean)
-
lsAttachPart
public List<javax.mail.BodyPart> lsAttachPart
list attach file
-
lsEmbedPart
public List<javax.mail.BodyPart> lsEmbedPart
list embed file
-
lsUnknowPart
public List<javax.mail.Part> lsUnknowPart
list part unknow to process
-
-
Method Detail
-
getHtmlContent
public String getHtmlContent(boolean withEmbedImg) throws javax.mail.MessagingException, IOException
get html content, when withEmbedImg = true, read embed image to base64 and embed to html content- Parameters:
withEmbedImg-- Returns:
- return null when has empty content
- Throws:
Exceptionjavax.mail.MessagingExceptionIOException
-
getHTMLImageBodyParts
public ArrayList<javax.mail.BodyPart> getHTMLImageBodyParts() throws javax.mail.MessagingException, IOException
- Throws:
javax.mail.MessagingExceptionIOException
-
getTextContent
public String getTextContent()
get text content- Returns:
- return null when has no content
-
-