我正在使用WSO2 EI 6.5.0发送带有附件的电子邮件。当附件位于数据库中存储的base64字符串中时,是否可以发送带有附件的HTML电子邮件?到目前为止,我尝试发送电子邮件,但是收到的电子邮件为纯文本。
我的流程应该是:
Proxy service > Get base64 string from database sequence > Send email sequence.
我试图找到参考文献,但没有找到关于我的问题的参考文献。
下面是发送电子邮件序列]的源代码]
<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="SendMailSequence">
<log level="full">
<property name="sequence" value="sendMailSequence" />
</log>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:binary xmlns:ns="http://ws.apache.org/commons/ns/payload">$1</ns:binary>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<!-- messageBody is from database -->
<arg expression="$ctx:messageBody" />
</args>
</payloadFactory>
<property name="messageType" value="application/octet-stream" scope="axis2" />
<property name="Subject" value="File Received" scope="transport" />
<property name="OUT_ONLY" value="true" />
<send>
<endpoint name="FileEpr">
<address uri="mailto:[email protected]" />
</endpoint>
</send>
</sequence>
我正在使用WSO2 EI 6.5.0发送带有附件的电子邮件。当附件位于数据库中存储的base64字符串中时,是否可以发送带有附件的HTML电子邮件?到目前为止,我尝试发送...
您为什么将messageType设置为application / octet-stream?如果设置正确的messageBuilder,它应该可以正常工作。请看以下链接。http://sachirajapakse.blogspot.com/2016/06/sending-mails-with-attachments-via-wso2.htmlWhy WSO2 ESB is Encoding Email Attachment in Base64