BizTalk SMTP Message Part Getting XML Encoding
- by alram
I have a email multi-part message which I am using to send failed message routing from the messagebox to a business users mailbox.
Email{ Body - RawString; OriginalMessage - string};
The original message gets set from the received message that activates the orchestration. For example assume the original failed message is from a Flat file that failed disassembly with the contents:
Order,1,2,3,4,5,<6>,
I set the message using:
Email.OriginalMessage = MyUtil.XlangMsgToStringMethod(FailedMessage);// XmlDocument type, this can be malformed xml, valid xml, or flat file that fails in disassembler.
I can then write to the event log to test whats in Email.OriginalMessage:
System.Diagnostics.EventLog.WriteEntry("BizTalk Server 2006", Email.OriginalMessage, Information); // This displays the correct original message "Order, 1,2,3,4,5,<6,"
When the email is delivered using a SMTP server and a dynamic send port, with the attachment set to text/plain mime type, the original message gets xml encoding escaped and wrapped in xml:
<?xml version="1.0"?>
<string>Order, 1,2,3,4,5,<6>,</string>
Any ideas why? The SMTP port has passthrutransmit as pipeline.
Thanks.