Package org.salespointframework.support
Class ConsoleWritingMailSender
- java.lang.Object
-
- org.salespointframework.support.ConsoleWritingMailSender
-
- All Implemented Interfaces:
org.springframework.mail.MailSender
- Direct Known Subclasses:
RecordingMailSender
public class ConsoleWritingMailSender extends Object implements org.springframework.mail.MailSender
MailSenderimplementation writing theSimpleMailMessageto be sent into the logs. If you want to access the mail messages sent, preferRecordingMailSender.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 yourapplication.properties.logging.level.org.salespointframework.support = INFO
To use a realMailSenderinstead, include thespring-boot-starter-mailmodule in your Maven POM file and follow the instructions in the reference documentation.- Author:
- Oliver Gierke
- See Also:
RecordingMailSender
-
-
Constructor Summary
Constructors Constructor Description ConsoleWritingMailSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsend(org.springframework.mail.SimpleMailMessage simpleMessage)voidsend(org.springframework.mail.SimpleMailMessage... simpleMessages)
-
-
-
Method Detail
-
send
public void send(org.springframework.mail.SimpleMailMessage simpleMessage) throws org.springframework.mail.MailException- Specified by:
sendin interfaceorg.springframework.mail.MailSender- Throws:
org.springframework.mail.MailException
-
send
public void send(org.springframework.mail.SimpleMailMessage... simpleMessages) throws org.springframework.mail.MailException- Specified by:
sendin interfaceorg.springframework.mail.MailSender- Throws:
org.springframework.mail.MailException
-
-