Mule SMTP - send email with attachment

后端 未结 2 1713
情书的邮戳
情书的邮戳 2021-01-25 14:40

I am trying to use Mule 3.3.0 and configure an SMTP Endpoint. The flow can have a File Inbound Endpoint and a SMTP outbound endpoint. Another flow can have a Java class that ge

相关标签:
2条回答
  • 2021-01-25 14:58

    It can be done in two ways.

    One with Mule configuration

    <set-attachment attachmentName="" value="" contentType="" />
    

    Second with Mule API.

    org.mule.api.MuleMessage.addOutboundAttachment(String arg0, Object arg1, String arg2) 
    

    or

    org.mule.api.MuleMessage.addOutboundAttachment(String arg0, DataHandler arg1)
    

    Hope this helps.

    0 讨论(0)
  • 2021-01-25 15:11

    To send attachments, add them to the Mule Message outbound attachments.

    See addOutboundAttachment in http://www.mulesoft.org/docs/site/3.3.0/apidocs/index.html?org/mule/api/MuleMessage.html

    0 讨论(0)
提交回复
热议问题