Blog Stats
  • Posts - 26
  • Articles - 2
  • Comments - 27
  • Trackbacks - 8

 

Tuesday, June 20, 2006

BizTalk 2004 - sending messages using SMTP


The SMTP adapter can be used to send messages to email addresses.

By default, the SMTP adapter comes with few options:

  • Note that BizTalk is no mail server. The SMTP adapter can connect to a mail server. So, to be able to send the mail out, you need a mail server as well.
  • You can control the “subject“, “from” and “to“ fields of the mail in a static way by defining them in the send port.
  • With the “from“-field contents, your mails server might have problems. Most mail servers do not accept mail relaying, which is sending mail on behalf of an address / domain that is not related to the mail server.
  • Multiple email-addresses are possible in a single field. You should be using a separator that is recognized by the mail server forwarding your mail. Usually a comma or a semicolon are separators.
  • Remember always to use a send pipeline that includes an smtp-encoder in the port definition. When you leave out the smtp-encoder, the message will be sent as plain text in the body of the email message.
  • Using the smtp-encoder, only a single message attachment can be linked to the email. You can not really control the name, extension, mime type of the attached message.

For the advanced applications:

  • Multiple attachments are possible. This is a so-called multipart message consisting of a body and more than one attachments. You will have to populate the whole multipart message in the BizTalk orchestration. The smtp-adapter then transforms that into a real email message, exactly following the multipart-layout you defined.
  • Many of the parameters of the email can be set dynamically in an orchestration. Please have a look at various weblog-posts on the net.
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
 

 

Copyright © Erwin Homan