【问题标题】:Send name trough smtp header with Mule ESB使用 Mule ESB 通过 smtp 标头发送名称
【发布时间】:2016-06-11 07:23:05
【问题描述】:

我们正在使用 Mule ESB 通过 smtp:connector 和 smtp:endpoint 发送电子邮件。我以前从来没有和骡子合作过。任务是通过 smtp 标头 FROM 字段发送一个人的姓名,以便该人的姓名屏蔽我们发送的通用电子邮件,基本上是“我的名字”。我已经用 mule 尝试过这种确切的格式,但它会引发一些格式错误的异常。我知道可以使用 java 来执行此操作,但似乎无法在 mule xml 文件中找到属性。也许它可以劫持 smtp:endpoint 并编写自定义的 java 代码来做到这一点?

ps。我不允许给你任何代码:(

【问题讨论】:

  • 能否分享一下虚拟代码。

标签: java mule esb


【解决方案1】:

尝试在 SMTP 出站端点的 from 属性中传递 MEL 表达式,如下所示:

<smtp:outbound-endpoint from="#[message.inboundProperties['smtp.from']]" host="..." port="..." connector-ref="..." to="#[message.inboundProperties['smtp.to']]"  subject="#[message.inboundProperties['smtp.subject']]" cc="#[message.inboundProperties['smtp.cc']]" bcc="#[message.inboundProperties['smtp.bcc']]" responseTimeout="10000" doc:name="Send SMTP"></smtp:outbound-endpoint>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-05
    • 2012-09-10
    • 2010-12-21
    相关资源
    最近更新 更多