Friday, November 20, 2009

Sending E-Mails with multiple attachments with BizTalk 2006

If you want to send an email with several attachments using the SMTP Adapter of BizTalk, you have to set the following context properties:
  • SMTP properties of the message: Subject, From, ...
  • MIME properties of each bodyparts: FileName and IsMIMEEncoded
The latter could look like this:
inmsg.BodyPart.PartProperties.Write("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", "file.html");
inmsg.BodyPart.PartProperties.Write("IsMIMEEncoded", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", false);

No comments: