Method Summary |
|
public MimeMessage | createMimeMessage() This implementation creates a SmartMimeMessage, holding the specified
default encoding and default FileTypeMap. |
public MimeMessage | createMimeMessage(InputStream contentStream) |
protected void | doSend(MimeMessage[] mimeMessages, Object[] originalMessages) Actually send the given array of MimeMessages via JavaMail. |
public String | getDefaultEncoding() Return the default encoding for
MimeMessage MimeMessages ,
or null if none. |
public FileTypeMap | getDefaultFileTypeMap() Return the default Java Activation
FileTypeMap for
MimeMessage MimeMessages , or null if none. |
public String | getHost() Return the mail server host. |
public String | getPassword() Return the password for the account at the mail host. |
public int | getPort() Return the mail server port. |
public String | getProtocol() Return the mail protocol. |
public Session | getSession() Return the JavaMail Session . |
protected Transport | getTransport(Session session) Obtain a Transport object from the given JavaMail Session,
using the configured protocol.
Can be overridden in subclasses, e.g. |
public String | getUsername() Return the username for the account at the mail host. |
public void | send(SimpleMailMessage simpleMessage) |
public void | send(SimpleMailMessage[] simpleMessages) |
public void | send(MimeMessage mimeMessage) |
public void | send(MimeMessage[] mimeMessages) |
public void | send(MimeMessagePreparator mimeMessagePreparator) |
public void | send(MimeMessagePreparator[] mimeMessagePreparators) |
public void | setDefaultEncoding(String defaultEncoding) Set the default encoding to use for
MimeMessage MimeMessages created by this instance. |
public void | setDefaultFileTypeMap(FileTypeMap defaultFileTypeMap) Set the default Java Activation
FileTypeMap to use for
MimeMessage 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. |
public void | setHost(String host) Set the mail server host, typically an SMTP host. |
public void | setJavaMailProperties(Properties javaMailProperties) Set JavaMail properties for the Session . |
public void | setPassword(String password) Set the password for the account at the mail host, if any.
Note that the underlying JavaMail Session has to be
configured with the property "mail.smtp.auth" set to
true , else the specified password will not be sent to the
mail server by the JavaMail runtime. |
public void | setPort(int port) Set the mail server port. |
public void | setProtocol(String protocol) Set the mail protocol. |
public void | setSession(Session session) Set the JavaMail Session , possibly pulled from JNDI. |
public void | setUsername(String username) Set the username for the account at the mail host, if any.
Note that the underlying JavaMail Session has to be
configured with the property "mail.smtp.auth" set to
true , else the specified username will not be sent to the
mail server by the JavaMail runtime. |