diff --git a/spring-integration-reference/src/mail.xml b/spring-integration-reference/src/mail.xml index ea5cdc99dc..f0c7f8cd9a 100644 --- a/spring-integration-reference/src/mail.xml +++ b/spring-integration-reference/src/mail.xml @@ -14,7 +14,8 @@ MailSendingMessageHandler mailSendingHandler = new MailSendingMessageHandler(mailSender); MailSendingMessageHandler has various mapping strategies that use Spring's MailMessage abstraction. If the received Message's payload is already - a MailMessage instance, it will be sent directly. Therefore, it is generally recommended to precede this + a MailMessage instance, it will be sent directly. + Therefore, it is generally recommended to precede this consumer with a Transformer for non-trivial MailMessage construction requirements. However, a few simple Message mapping strategies are supported out-of-the-box. For example, if the message payload is a byte array, then that will be mapped to an attachment. For simple text-based emails, you can provide a String-based @@ -35,6 +36,11 @@ MailHeaders.FROM MailHeaders.REPLY_TO + + MailHeaders also allows you to override corresponding MailMessage values. + For example: If MailMessage.to is set to 'foo@bar.com' and MailHeaders.TO + Message header is provided it will take precedence and override the corresponding value in MailMessage +