public final class OneMimeMessageHelper extends Object
| Constructor and Description |
|---|
OneMimeMessageHelper(javax.mail.internet.MimeMessage message,
boolean isMultipart)
Create a new instance for a given mime message.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(String attachmentFileName,
org.springframework.core.io.InputStreamSource inputStreamSource,
String contentType)
add attachment to the message.
|
void |
addHeaders(Map<String,String> headers)
Add additional message headers.
|
com.google.common.collect.ImmutableMap<String,String> |
getAllHeaders()
Get all message headers (including the standard ones).
|
String[] |
getBcc()
Get the message 'Bcc' recipients.
|
String[] |
getCc()
Get the message 'Cc' recipients.
|
String[] |
getFrom()
Get the message 'from' address
|
String |
getFullMessageText()
Get the full message text.
|
int |
getPriority()
Get the message priority.
|
String[] |
getReplyTo()
Get the message 'ReplyTo' address.
|
String |
getSubject()
Get the message subject.
|
String[] |
getTo()
Get the message 'To' recipients.
|
void |
setBcc(String... addresses)
Set the message 'Bcc' recipients.
|
void |
setBody(String content,
boolean isHtml)
Set the message body.
|
void |
setCc(String... addresses)
Set the message 'Cc' recipients.
|
void |
setFrom(String address)
Set the message 'from' address.
|
void |
setPriority(int priority)
Set the message priority.
|
void |
setReplyTo(String address)
Set the message 'ReplyTo' address.
|
void |
setSubject(String subject)
Set the message subject.
|
void |
setTo(String... addresses)
Set the message 'To' recipients.
|
public OneMimeMessageHelper(javax.mail.internet.MimeMessage message,
boolean isMultipart)
message - mime messageisMultipart - multipart flagpublic void setSubject(String subject)
subject - the message subjectpublic String getSubject()
public void setBody(String content, boolean isHtml)
content - the body contentisHtml - true if the body is HTML textpublic void setFrom(String address)
address - the message 'from' addresspublic String[] getFrom()
public void setTo(String... addresses)
addresses - the message 'To' recipientspublic String[] getTo()
public void setReplyTo(String address)
address - the message 'ReplyTo' addresspublic String[] getReplyTo()
public void setCc(String... addresses)
addresses - the message 'Cc' recipientspublic String[] getCc()
public void setBcc(String... addresses)
addresses - the message 'Bcc' recipientspublic String[] getBcc()
public void setPriority(int priority)
priority - the message priority (normally in the range 1-5)public int getPriority()
public String getFullMessageText()
public void addHeaders(Map<String,String> headers)
headers - the additional message headerspublic com.google.common.collect.ImmutableMap<String,String> getAllHeaders()
public void addAttachment(String attachmentFileName, org.springframework.core.io.InputStreamSource inputStreamSource, String contentType)
attachmentFileName - name of the attached fileinputStreamSource - file contentcontentType - file content type.Copyright © 2010 - 2017 edorasware ag. All Rights Reserved.