接口 MimeMessagePreparator
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
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.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Harry Yang
- 另请参阅:
-
方法概要
修饰符和类型方法说明voidprepare(jakarta.mail.internet.MimeMessage mimeMessage) Prepare the given new MimeMessage instance.
-
方法详细资料
-
prepare
Prepare the given new MimeMessage instance.- 参数:
mimeMessage- the message to prepare- 抛出:
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
-