Package org.salespointframework.support
Class RecordingMailSender
java.lang.Object
org.salespointframework.support.ConsoleWritingMailSender
org.salespointframework.support.RecordingMailSender
- All Implemented Interfaces:
MailSender
public class RecordingMailSender extends ConsoleWritingMailSender
A
MailSender implementation that allows looking up all SimpleMailMessages that have been sent. Will
also log the messages as they are received for sending. The required setup steps can be found in
ConsoleWritingMailSender's JavaDoc.- Since:
- 6.3.1
- Author:
- Oliver Gierke
-
Constructor Summary
Constructors Constructor Description RecordingMailSender() -
Method Summary
Modifier and Type Method Description Streamable<SimpleMailMessage>getSentMessages()Returns allSimpleMailMessages that have been recorded so far.voidsend(SimpleMailMessage simpleMessage)
-
Constructor Details
-
RecordingMailSender
public RecordingMailSender()
-
-
Method Details
-
send
- Specified by:
sendin interfaceMailSender- Overrides:
sendin classConsoleWritingMailSender- Throws:
MailException
-
getSentMessages
Returns allSimpleMailMessages that have been recorded so far.- Returns:
- will never be null.
-