使用SMTP适配器发送HTML电子邮件 [英] Send HTML Email by using SMTP adapter
问题描述
我想知道如何使用SMTP适配器从BizTalk发送HTML格式的电子邮件?
我认为SMTP adpater只能进行文本格式。
对于HTML格式,我需要创建html内容在Orchestration中的System.String中并传递给发送形状。
但我得到的是:<?xml version =" 1.0"编码= QUOT; UTF-8英寸?>
< string>& lt; html xmlns:var =" http://schemas.microsoft.com/BizTalk/2003/var"的xmlns:NS0 = QUOT; HTTP:// import_report_outbound_v2"
xmlns:msxsl =" urn:schemas-microsoft-com:xslt" xmlns:userCSharp =" http://schemas.microsoft.com/BizTalk/2003/userCSharp"& gt;& lt; header /& gt;& lt; body& gt;& lt; p& gt;
Kuehne-Nagel已经为我们上传给他们的采购订单返回了错误消息,下面是错误的详细信息
& lt; / p& gt;& lt; br /& ; gt;& lt; / body& gt;& lt; / html& gt;< / string>
有人可以帮忙吗?
我不确定这是否是最有效的方法。
我最近做的是确保消息是最终的html格式消息。我将ContentType设置为'text / html',并将发送端口SMTP Transport属性Compose-> Email body设置为'BizTalk message body part'。
我希望这有点帮助。
I am wondering how I can send a HTML format email from BizTalk by using SMTP adapter?
I think SMTP adpater only can do text format.
For HTML format, I need to create the html contents in System.String in the Orchestration and pass to the send shape.
But what I got is something like:
<?xml version="1.0" encoding="utf-8" ?>
<string><html xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" xmlns:ns0="http://import_report_outbound_v2"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:userCSharp="http://schemas.microsoft.com/BizTalk/2003/userCSharp"><header /><body><p>
Kuehne-Nagel has returned an error message for the purchase order we uploaded to them, below is the details of the errors
</p><br /></body></html></string>
Can someone help, please?
I'm not sure if this is the most efficient method.
What I recently did was ensure the message is the final html formatted message. I set the ContentType to 'text/html' and set the sent port SMTP Transport property Compose->Email body to 'BizTalk message body part'.
I hope this helps a little bit.
这篇关于使用SMTP适配器发送HTML电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!