|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.mail.MailContent
public class MailContent
Field Summary | |
---|---|
static MailContent |
EMPTY
|
Method Summary | |
---|---|
void |
applyOn(javax.mail.internet.MimeMessage message)
Applies the content information on a MimeMessage . |
MailContent |
notHtml()
Forces the information that the content is not an HTML one. |
static MailContent |
of(javax.mail.Multipart multipart)
Gets a new instance of MimeMessage by specifying a content as a Multipart . |
static MailContent |
of(String content)
Gets a new instance of MimeMessage by specifying a content as a string. |
String |
toString()
|
MailContent |
withContentType(String contentType)
Sets the content type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final MailContent EMPTY
Method Detail |
---|
public static MailContent of(String content)
MimeMessage
by specifying a content as a string.
content
- the string content
MimeMessage
.public static MailContent of(javax.mail.Multipart multipart)
MimeMessage
by specifying a content as a Multipart
.
multipart
- the Multipart
content
MimeMessage
.public MailContent notHtml()
MailContent
.public MailContent withContentType(String contentType)
contentType
- the content type to set.
MailContent
.public void applyOn(javax.mail.internet.MimeMessage message) throws javax.mail.MessagingException
MimeMessage
.
If the content is a string and contains <html>
TAG, then the content is considered as
an HTML one, even if isHtml()
returns false.
message
- the MimeMessage
.
javax.mail.MessagingException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |