Ravindar, Integrations with Mulesoft & BizTalk

Just another Integration blog

Sending a Text E-Mail Message from an Orchestration

Sending a text e-mail message from an orchestration requires more work than simply attaching an InfoPath form. Sending a message of type System.String will not work, because the string gets formatted as an XML document in the message, which is not your desired solution.

To send text in an e-mail message, you must use a special type of string, a RawString, in combination with a pipeline containing the MIME/SMIME Encoder pipeline component. The code to implement the RawString type is custom code that must be built, placed in the global assembly cache, and referenced from your assembly. For the RawString code, see Source Code for Custom Formatting of E-Mail Messages.

Using the RawString code, you can construct a message using the following code in the Expression Editor of Orchestration Designer:

RawOutMsg = new Microsoft.XLANGs.CustomFormattersSDK.RawString( “e-mail body goes here” );
SP_Acknowledgement(Microsoft.XLANGs.BaseTypes.Address) = “mailto:MyManager@MyCompany.com”;
msgAcknowledgement(SMTP.Subject) = “Expense report submission confirmation”;

Where RawOutMsg is declared as a message of type Microsoft.XLANGs.CustomFormattersSDK.RawString.

http://msdn.microsoft.com/en-us/library/ms962967.aspx

April 17, 2011 - Posted by | Uncategorized

No comments yet.

Leave a comment