Blogger :
BiztalkBlogs.com
All posts :
All posts by BiztalkBlogs.com
Category :
BizTalk 2006
Blogged date : 2006 Mar 07
Now, we can send e-mails with local file(s) as attachment(s) in BizTalk 2006 without add these files as Multipart-MessageParts of the message that we'll send. This new feature can be used for both static and dynamic ports.
If you use static ports, you can use the new Admin Console to select the file(s) that you can send without problems. But, if you need that these files change depending of message type, then you must use a dynamic port and set the path of file(s) to new SMTP.Attachments context property of http://schemas.microsoft.com/BizTalk/2003/smtp-properties namespace. There is only one restriction, you have to use a pipe character (|) to separate all path file(s) and one more pipe in the end of path(s), for example:
Msg_Mail(SMTP.From) = "carlos1254@mycompany.com"; Msg_Mail(SMTP.SMTPHost) = "SMTPServer"; Msg_Mail(SMTP.Subject) = "Dynamic attach files"; Msg_Mail(SMTP.Attachments) = "c:\file1.txt|c:\image2.jpg|d:\file1.xml|"; Port_SendMail(Microsoft.XLANGs.BaseTypes.Address) = "mailto:carlos1254@destiny.com";
|
This is a fantastic new feature of SMTP Adatper in BizTalk 2006.