Class SimpleMailMessageItemWriterBuilder
java.lang.Object
org.springframework.batch.item.mail.builder.SimpleMailMessageItemWriterBuilder
Creates a fully qualified SimpleMailMessageItemWriter.
- Since:
- 4.0
- Author:
- Glenn Renfro, Mahmoud Ben Hassine
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a fully constructedSimpleMailMessageItemWriter
.mailErrorHandler
(MailErrorHandler mailErrorHandler) The handler for failed messages.mailSender
(org.springframework.mail.MailSender mailSender) AMailSender
to be used to send messages inSimpleMailMessageItemWriter.write(Chunk)
.
-
Constructor Details
-
SimpleMailMessageItemWriterBuilder
public SimpleMailMessageItemWriterBuilder()
-
-
Method Details
-
mailSender
public SimpleMailMessageItemWriterBuilder mailSender(org.springframework.mail.MailSender mailSender) AMailSender
to be used to send messages inSimpleMailMessageItemWriter.write(Chunk)
.- Parameters:
mailSender
- strategy for sending simple mails.- Returns:
- this instance for method chaining.
- See Also:
-
mailErrorHandler
The handler for failed messages. Defaults to aDefaultMailErrorHandler
.- Parameters:
mailErrorHandler
- the mail error handler to set.- Returns:
- this instance for method chaining.
- See Also:
-
build
Returns a fully constructedSimpleMailMessageItemWriter
.- Returns:
- a new
SimpleMailMessageItemWriter
-