Setting attachment filename with the SMTP Adapter

Link. July 27, 2006. Comments [0]. Posted in: BizTalk
In BizTalk 2004, if you wanted to specify how an attachment filename was defined when sending an email through the SMTP adapter, you'd need to use the SMTPUtils class (whose code was included in the BizTalk documentation), like this:

SMTPUtils.Part.SetFileName(Message, filename);

In BizTalk 2006, however, using SMTPUtils is no longer necessary, thanks to the fact that now you can directly reference the attachment part's properties using an expression in your orchestration. So now, you can do this:

<Message>.<Part>(MIME.FileName) = <filename>;

e.g.

EMail.OriginalMessage(MIME.FileName) = "OriginalMessage.xml";



Comments are closed.

Syndicate

About

Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...

tomasrestrepo @ twitter My Flickr photostream My saved links on delicious My Technorati Profile

email: tomas@winterdom.com
msn: tomasr@passport.com

View my profile on LinkedIn

MVP logo

Ads


Categories

Statistics

Total Posts: 1050
This Year: 1
This Month: 1
This Week: 0
Comments: 825

Archive

Other

Copyright © 2002-2008, Tomas Restrepo.

Powered by: newtelligence dasBlog 2.2.8279.16125

Sign In