Showing posts with label SMTP. Show all posts
Showing posts with label SMTP. Show all posts

Friday, June 26, 2015

Sending Mail from Dynamic Port with Password Authentication

If you are sending an e-mail over the SMTP adapter using a dynamic send port and you want to use user/password authentication at the SMTP server, you have to do the following in the orchestration:
  • Set all relevent SMTP properties
  • Promote the SMTP properties in a correlation set - but not the Passwort property because this one is marked as "IsSensitive" and hence cannot be promoted.
This is due to security reaspons so that a BizTalk operator cannot see the password in any running instance.

If you promote the password anyway, you run into the following exception:
Shape name: MailSend
ShapeId: %GUID%
Exception thrown from: segment 1, progress 12
Inner exception: The value assigned to property 'SMTP.Password' is not valid: '%password%'.
Exception type: InvalidPropertyValueException

Thanks for sharing, Ronny!

Tuesday, August 30, 2011

Setting the mail address of Receiver in the Pipeline Component

If you want to send a message with a static or dynamic SMTP send port, you can configure the mail address of the receiver in a pipeline component. Therefore, you have to promote OutboundTransportLocation in the message context of the message:
msgContext.Promote("OutboundTransportLocation", "http://schemas.microsoft.com/BizTalk/2003/system-properties", "mailto:" + mailAddress);

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);