Reputation: 117
We are using Mule ESB to send emails with smtp:connector and smtp:endpoint. I've never worked with mule before. The task is to send the name of a person trough smtp header FROM field, so that person's name masks generic email that we are sending with, basically "My Name" . I've tried this exact format with mule but it throws some malformed exception. I know it is possible to do this with java but can't seem to find a property in mule xml file. Maybe its possible to hijack smtp:endpoint and write custom java code that will do this?
ps. I am not allowed to give you any code :(
Upvotes: 0
Views: 113
Reputation: 334
Try passing MEL expression in from attribute of SMTP outbound endpoint, like below:
<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>
Upvotes: 1