我使用Mule发送电子邮件。我需要为我发送的文本添加格式。 邮件的内容是有一个字符串的有效载荷,我在Java方法中形成并通过表达式转换器发送到流。 我需要为该字符串添加格式:粗体,下划线,颜色.... 我该怎么做?用Mule发送格式化的邮件
这是我流的摘录:
<expression-transformer expression="#[com.generateText4Email(payload)]" doc:name="mailText"/>
<smtp:outbound-endpoint host="${smtp.host}"
responseTimeout="10000" doc:name="SMTP" connector-ref="smtpConnector"
from="${smtp.from}" port="${smtp.port}" subject="Invoice"
to="[email protected]" />
我这个尝试,但它不工作。
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Email</title></head><body style="font-family:'Century Gothic'"><h1 style="text-align:center;"> company </h1><h2 style="font-size:14px;">Name : name <br />Company : arch <br />Email : [email protected]</h2><p>fin</p></body></html>
在此先感谢。