Class MimeMailMessage
java.lang.Object
org.springframework.mail.javamail.MimeMailMessage
- All Implemented Interfaces:
MailMessage
Implementation of the MailMessage interface for a JavaMail MIME message,
to let message population code interact with a simple message or a MIME
message through a common interface.
Uses a MimeMessageHelper underneath. Can either be created with a MimeMessageHelper instance or with a JavaMail MimeMessage instance.
- Since:
- 1.1.5
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorDescriptionMimeMailMessage
(MimeMessage mimeMessage) Create a new MimeMailMessage based on the given JavaMail MimeMessage.MimeMailMessage
(MimeMessageHelper mimeMessageHelper) Create a new MimeMailMessage based on the given MimeMessageHelper. -
Method Summary
Modifier and TypeMethodDescriptionfinal MimeMessage
Return the JavaMail MimeMessage that this MimeMailMessage is based on.final MimeMessageHelper
Return the MimeMessageHelper that this MimeMailMessage is based on.void
void
void
void
void
void
setReplyTo
(String replyTo) void
setSentDate
(Date sentDate) void
setSubject
(String subject) void
void
void
-
Constructor Details
-
MimeMailMessage
Create a new MimeMailMessage based on the given MimeMessageHelper.- Parameters:
mimeMessageHelper
- the MimeMessageHelper
-
MimeMailMessage
Create a new MimeMailMessage based on the given JavaMail MimeMessage.- Parameters:
mimeMessage
- the JavaMail MimeMessage
-
-
Method Details
-
getMimeMessageHelper
Return the MimeMessageHelper that this MimeMailMessage is based on. -
getMimeMessage
Return the JavaMail MimeMessage that this MimeMailMessage is based on. -
setFrom
- Specified by:
setFrom
in interfaceMailMessage
- Throws:
MailParseException
-
setReplyTo
- Specified by:
setReplyTo
in interfaceMailMessage
- Throws:
MailParseException
-
setTo
- Specified by:
setTo
in interfaceMailMessage
- Throws:
MailParseException
-
setTo
- Specified by:
setTo
in interfaceMailMessage
- Throws:
MailParseException
-
setCc
- Specified by:
setCc
in interfaceMailMessage
- Throws:
MailParseException
-
setCc
- Specified by:
setCc
in interfaceMailMessage
- Throws:
MailParseException
-
setBcc
- Specified by:
setBcc
in interfaceMailMessage
- Throws:
MailParseException
-
setBcc
- Specified by:
setBcc
in interfaceMailMessage
- Throws:
MailParseException
-
setSentDate
- Specified by:
setSentDate
in interfaceMailMessage
- Throws:
MailParseException
-
setSubject
- Specified by:
setSubject
in interfaceMailMessage
- Throws:
MailParseException
-
setText
- Specified by:
setText
in interfaceMailMessage
- Throws:
MailParseException
-