| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Implementation of the JavaMailSender interface. Can also be used as plain MailSender implementation.
Allows for defining all settings locally as bean properties. Alternatively, a pre-configured JavaMail Session can be specified, possibly pulled from an application server's JNDI environment.
Non-default properties in this object will always override the settings in the JavaMail Session. Note that if overriding all values locally, there is no value in setting a pre-configured Session.
Field Summary | |
final static int | DEFAULT_PORT |
final static String | DEFAULT_PROTOCOL |
Method Summary | |
MimeMessage | createMimeMessage() |
void | send(SimpleMailMessage simpleMessage) |
void | send(SimpleMailMessage[] simpleMessages) |
void | send(MimeMessage mimeMessage) |
void | send(MimeMessage[] mimeMessages) |
void | send(MimeMessage[] mimeMessages, Object[] originalMessages) |
void | send(MimeMessagePreparator mimeMessagePreparator) |
void | send(MimeMessagePreparator[] mimeMessagePreparators) |
void | setHost(String host) Set the mail server host, typically an SMTP host. |
void | setPassword(String password) Set the password for the account at the mail host, if any. |
void | setPort(int port) Set the mail server port. |
void | setProtocol(String protocol) Set the mail protocol. |
void | setSession(Session session) Set the JavaMail Session, possibly pulled from JNDI. |
void | setUsername(String username) Set the username for the account at the mail host, if any. |
Field Detail |
public final static int DEFAULT_PORT
public final static String DEFAULT_PROTOCOL
Method Detail |
public MimeMessage createMimeMessage()
public void send(SimpleMailMessage simpleMessage)
throws org.springframework.mail.MailException
public void send(SimpleMailMessage[] simpleMessages)
throws org.springframework.mail.MailException
public void send(MimeMessage mimeMessage)
throws org.springframework.mail.MailException
public void send(MimeMessage[] mimeMessages)
throws org.springframework.mail.MailException
public void send(MimeMessage[] mimeMessages, Object[] originalMessages)
throws org.springframework.mail.MailException
public void send(MimeMessagePreparator mimeMessagePreparator)
throws org.springframework.mail.MailException
public void send(MimeMessagePreparator[] mimeMessagePreparators)
throws org.springframework.mail.MailException
public void setHost(String host)
public void setPassword(String password)
public void setPort(int port)
public void setProtocol(String protocol)
public void setSession(Session session)
If using a pre-configured Session, non-default properties in this object will override the settings in the Session.
public void setUsername(String username)
Association Links |
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |