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:

.(MIME.FileName) = ;


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

Tomas Restrepo

Software developer located in Colombia.