public class SimpleEmailServiceJavaMailSender extends SimpleEmailServiceMailSender implements JavaMailSender
JavaMailSender implementation that allows to send MimeMessage using the
Simple E-Mail Service. In contrast to SimpleEmailServiceMailSender this class
also allows the use of attachment and other mime parts inside mail messages.| Constructor and Description |
|---|
SimpleEmailServiceJavaMailSender(com.amazonaws.services.simpleemail.AmazonSimpleEmailService amazonSimpleEmailService)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
javax.mail.internet.MimeMessage |
createMimeMessage()
Deprecated.
|
javax.mail.internet.MimeMessage |
createMimeMessage(InputStream contentStream)
Deprecated.
|
protected Properties |
getJavaMailProperties()
Deprecated.
Allow Map access to the JavaMail properties of this sender, with the option to add
or override specific entries.
|
protected javax.mail.Session |
getSession()
Deprecated.
Return the JavaMail
Session, lazily initializing it if hasn't been
specified explicitly. |
void |
send(javax.mail.internet.MimeMessage... mimeMessages)
Deprecated.
|
void |
send(javax.mail.internet.MimeMessage mimeMessage)
Deprecated.
|
void |
send(MimeMessagePreparator... mimeMessagePreparators)
Deprecated.
|
void |
send(MimeMessagePreparator mimeMessagePreparator)
Deprecated.
|
void |
setDefaultEncoding(String defaultEncoding)
Deprecated.
Set the default encoding to use for
MimeMessages created by
this instance. |
void |
setDefaultFileTypeMap(FileTypeMap defaultFileTypeMap)
Deprecated.
Set the default Java Activation
FileTypeMap to use for MimeMessages created by this instance. |
void |
setJavaMailProperties(Properties javaMailProperties)
Deprecated.
Set JavaMail properties for the
Session. |
void |
setSession(javax.mail.Session session)
Deprecated.
Set the JavaMail
Session, possibly pulled from JNDI. |
destroy, getEmailService, send, sendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsend, sendpublic SimpleEmailServiceJavaMailSender(com.amazonaws.services.simpleemail.AmazonSimpleEmailService amazonSimpleEmailService)
protected Properties getJavaMailProperties()
Useful for specifying entries directly, for example via "javaMailProperties[mail.from]".
public void setJavaMailProperties(Properties javaMailProperties)
Session.
A new Session will be created with those properties.
Non-default properties in this instance will override given JavaMail properties.
javaMailProperties - java mail propsprotected javax.mail.Session getSession()
Session, lazily initializing it if hasn't been
specified explicitly.public void setSession(javax.mail.Session session)
Session, possibly pulled from JNDI.
Default is a new Session without defaults, that is completely configured
via this instance's properties.
If using a pre-configured Session, non-default properties in this instance
will override the settings in the Session.
session - JavaMail sessionsetJavaMailProperties(java.util.Properties)public void setDefaultEncoding(String defaultEncoding)
MimeMessages created by
this instance.
Such an encoding will be auto-detected by MimeMessageHelper.
defaultEncoding - default encoding for mime messagespublic void setDefaultFileTypeMap(FileTypeMap defaultFileTypeMap)
FileTypeMap to use for MimeMessages created by this instance.
A FileTypeMap specified here will be autodetected by
MimeMessageHelper, avoiding the need to specify the FileTypeMap for
each MimeMessageHelper instance.
For example, you can specify a custom instance of Spring's
ConfigurableMimeFileTypeMap here. If not explicitly specified, a default
ConfigurableMimeFileTypeMap will be used, containing an extended set of
MIME type mappings (as defined by the mime.types file contained in the
Spring jar).
defaultFileTypeMap - Java Activation file type mapMimeMessageHelper.setFileTypeMap(javax.activation.FileTypeMap)public javax.mail.internet.MimeMessage createMimeMessage()
createMimeMessage in interface JavaMailSenderpublic javax.mail.internet.MimeMessage createMimeMessage(InputStream contentStream) throws MailException
createMimeMessage in interface JavaMailSenderMailExceptionpublic void send(javax.mail.internet.MimeMessage mimeMessage)
throws MailException
send in interface JavaMailSenderMailExceptionpublic void send(javax.mail.internet.MimeMessage... mimeMessages)
throws MailException
send in interface JavaMailSenderMailExceptionpublic void send(MimeMessagePreparator mimeMessagePreparator) throws MailException
send in interface JavaMailSenderMailExceptionpublic void send(MimeMessagePreparator... mimeMessagePreparators) throws MailException
send in interface JavaMailSenderMailExceptionCopyright © 2021 Pivotal Software, Inc.. All rights reserved.