Interface MimeMessagePreparator
- Functional Interface:
 - This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
Callback interface for the preparation of JavaMail MIME messages.
The corresponding send methods of JavaMailSender
will take care of the actual creation of a MimeMessage instance,
and of proper exception conversion.
It is often convenient to use a MimeMessageHelper for populating
the passed-in MimeMessage, in particular when working with attachments or
special character encodings.
See MimeMessageHelper's javadoc for an example.
- Since:
 - 07.10.2003
 - Author:
 - Juergen Hoeller
 - See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionvoidprepare(jakarta.mail.internet.MimeMessage mimeMessage) Prepare the given new MimeMessage instance. 
- 
Method Details
- 
prepare
Prepare the given new MimeMessage instance.- Parameters:
 mimeMessage- the message to prepare- Throws:
 jakarta.mail.MessagingException- passing any exceptions thrown by MimeMessage methods through for automatic conversion to the MailException hierarchyIOException- passing any exceptions thrown by MimeMessage methods through for automatic conversion to the MailException hierarchyException- if mail preparation failed, for example when a FreeMarker template cannot be rendered for the mail text
 
 -