Package org.salespointframework.support
Class RecordingMailSender
- java.lang.Object
-
- org.salespointframework.support.ConsoleWritingMailSender
-
- org.salespointframework.support.RecordingMailSender
-
- All Implemented Interfaces:
org.springframework.mail.MailSender
public class RecordingMailSender extends ConsoleWritingMailSender
AMailSenderimplementation that allows looking up allSimpleMailMessages that have been sent. Will also log the messages as they are received for sending. The required setup steps can be found inConsoleWritingMailSender's JavaDoc.- Since:
- 6.3.1
- Author:
- Oliver Gierke
-
-
Constructor Summary
Constructors Constructor Description RecordingMailSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.util.Streamable<org.springframework.mail.SimpleMailMessage>getSentMessages()Returns allSimpleMailMessages that have been recorded so far.voidsend(org.springframework.mail.SimpleMailMessage simpleMessage)-
Methods inherited from class org.salespointframework.support.ConsoleWritingMailSender
send
-
-
-
-
Method Detail
-
send
public void send(org.springframework.mail.SimpleMailMessage simpleMessage) throws org.springframework.mail.MailException- Specified by:
sendin interfaceorg.springframework.mail.MailSender- Overrides:
sendin classConsoleWritingMailSender- Throws:
org.springframework.mail.MailException
-
getSentMessages
public org.springframework.data.util.Streamable<org.springframework.mail.SimpleMailMessage> getSentMessages()
Returns allSimpleMailMessages that have been recorded so far.- Returns:
- will never be null.
-
-