public class MailToStringTransformer extends AbstractMailMessageTransformer<java.lang.String>
Message
to a String.
If the mail message's content is a String, it will be the payload of the
result Message. If the content is a Multipart, a String will be created from
an output stream of bytes using the provided charset (or UTF-8 by default).logger
Constructor and Description |
---|
MailToStringTransformer() |
Modifier and Type | Method and Description |
---|---|
protected MessageBuilder<java.lang.String> |
doTransform(javax.mail.Message mailMessage) |
void |
setCharset(java.lang.String charset)
Specify the name of the Charset to use when converting from bytes.
|
transform
public void setCharset(java.lang.String charset)
protected MessageBuilder<java.lang.String> doTransform(javax.mail.Message mailMessage) throws java.lang.Exception
doTransform
in class AbstractMailMessageTransformer<java.lang.String>
java.lang.Exception