Package org.salespointframework.support
Class ConsoleWritingMailSender
java.lang.Object
org.salespointframework.support.ConsoleWritingMailSender
- All Implemented Interfaces:
MailSender
- Direct Known Subclasses:
RecordingMailSender
MailSender implementation writing the SimpleMailMessage to be sent into the logs. If you want to
access the mail messages sent, prefer RecordingMailSender.
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.- Author:
- Oliver Gierke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsend(SimpleMailMessage simpleMessage) voidsend(SimpleMailMessage... simpleMessages)
-
Constructor Details
-
ConsoleWritingMailSender
public ConsoleWritingMailSender()
-
-
Method Details
-
send
- Specified by:
sendin interfaceMailSender- Throws:
MailException
-
send
- Specified by:
sendin interfaceMailSender- Throws:
MailException
-