public class ConsoleWritingMailSender extends Object implements org.springframework.mail.MailSender
MailSender implementation writing the SimpleMailMessage to be sent into the logs. Should be used for
testing purposes only.
The component can be used by declaring a Spring bean definition for it, e.g. in a Spring Boot application like this:
@Bean
public MailSender mailSender() {
return new ConsoleWritingMailSender();
}
Make sure, you're setting the log level for Salespoint to INFO to actually see the sent messages. This can be
achieved adding the following line to your application.properties.
logging.level.org.salespointframework.support = INFOTo use a real
MailSender instead, include the spring-boot-starter-mail module in your Maven POM file
and follow the instructions in the
reference
documentation.http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-email| Constructor and Description |
|---|
ConsoleWritingMailSender() |
| Modifier and Type | Method and Description |
|---|---|
void |
send(org.springframework.mail.SimpleMailMessage... simpleMessages) |
void |
send(org.springframework.mail.SimpleMailMessage simpleMessage) |
public void send(org.springframework.mail.SimpleMailMessage simpleMessage)
throws org.springframework.mail.MailException
send in interface org.springframework.mail.MailSenderorg.springframework.mail.MailExceptionpublic void send(org.springframework.mail.SimpleMailMessage... simpleMessages)
throws org.springframework.mail.MailException
send in interface org.springframework.mail.MailSenderorg.springframework.mail.MailExceptionCopyright © 2016 Pivotal Software, Inc.. All rights reserved.