public class MimeMailMessage extends Object implements MailMessage
Uses a MimeMessageHelper underneath. Can either be created with a MimeMessageHelper instance or with a JavaMail MimeMessage instance.
MimeMessageHelper
,
MimeMessage
Constructor and Description |
---|
MimeMailMessage(MimeMessage mimeMessage)
Create a new MimeMailMessage based on the given JavaMail MimeMessage.
|
MimeMailMessage(MimeMessageHelper mimeMessageHelper)
Create a new MimeMailMessage based on the given MimeMessageHelper.
|
Modifier and Type | Method and Description |
---|---|
MimeMessage |
getMimeMessage()
Return the JavaMail MimeMessage that this MimeMailMessage is based on.
|
MimeMessageHelper |
getMimeMessageHelper()
Return the MimeMessageHelper that this MimeMailMessage is based on.
|
void |
setBcc(String... bcc) |
void |
setBcc(String bcc) |
void |
setCc(String... cc) |
void |
setCc(String cc) |
void |
setFrom(String from) |
void |
setReplyTo(String replyTo) |
void |
setSentDate(Date sentDate) |
void |
setSubject(String subject) |
void |
setText(String text) |
void |
setTo(String... to) |
void |
setTo(String to) |
public MimeMailMessage(MimeMessageHelper mimeMessageHelper)
mimeMessageHelper
- the MimeMessageHelperpublic MimeMailMessage(MimeMessage mimeMessage)
mimeMessage
- the JavaMail MimeMessagepublic final MimeMessageHelper getMimeMessageHelper()
public final MimeMessage getMimeMessage()
public void setFrom(String from) throws MailParseException
setFrom
in interface MailMessage
MailParseException
public void setReplyTo(String replyTo) throws MailParseException
setReplyTo
in interface MailMessage
MailParseException
public void setTo(String to) throws MailParseException
setTo
in interface MailMessage
MailParseException
public void setTo(String... to) throws MailParseException
setTo
in interface MailMessage
MailParseException
public void setCc(String cc) throws MailParseException
setCc
in interface MailMessage
MailParseException
public void setCc(String... cc) throws MailParseException
setCc
in interface MailMessage
MailParseException
public void setBcc(String bcc) throws MailParseException
setBcc
in interface MailMessage
MailParseException
public void setBcc(String... bcc) throws MailParseException
setBcc
in interface MailMessage
MailParseException
public void setSentDate(Date sentDate) throws MailParseException
setSentDate
in interface MailMessage
MailParseException
public void setSubject(String subject) throws MailParseException
setSubject
in interface MailMessage
MailParseException
public void setText(String text) throws MailParseException
setText
in interface MailMessage
MailParseException