Ravindar, Biztalk Developer and Administrator

Just another BizTalk 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.



April 17, 2011 - Posted by | Uncategorized

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: