How to send a "Text" Email with BizTalk Server 2004

Due to the fact that sending a plain, easy Text Email is not a straightforward task, which is easy to accomplish with BizTalk 2004, I have created (with the perfect input from a colleague who has looked it up at Scott's blog) a little checklist, to do the sending. Although it is a common and often needed task to send Text Emails out of BizTalk Server, it is not an out of the box feature - but I promise it's really easy if you know how to do it! ;-)

  1. Create a new Pipeline in your Project. (Or in a new project if you want) and drag an MIME/SMIME Encoder to the encoding section of your Pipeline. Afterwards build and deploy it to use it in your Send Ports.
  2. The next step is to create a new Data Type for your projects: a RAW String Data Type.
    • Get the zip File from this Blog Entry by Scott Woodgate: http://blogs.msdn.com/scottwoo/archive/2004/04/19/116298.aspx
    • Extract the Folder OrchStreaming and use build_it.cmd and deploy_it.cmd. But beware there could/will be Build errors(!) - Better do the building manually with the solution in the Subfolder "Microsoft.XLANGs.StreamingSDK". You will have to update the path to the Key File und you will have to update the assembly reference to the Microsoft.XLANGs.BaseTypes assembly. After the successfull build deploy the solution to the GAC with the deploy_it.cmd file.
    • The resulting dll is in the BIN folder and it's name is Microsoft.XLANGs.StreamingSDK.dll
    • Add a reference to the dll to your project.
  3. Now that the new DataType is available, open your Project where you want to send Emails, and create a new Message with the DataType "Microsoft.XLANGs.CustomFormattersSDK.RawString".
  4. Place a Message Construction with Message Assignment where you create your Message. Put the following
    • MessageName  = new Microsoft.XLANGs.CustomFormattersSDK.RawString("Testtext");
      MessageName(SMTP.Subject) = "TestSubject";
  5. Create a dynamic Port.
  6. In an expression shape assign an Email Adress to the dynamic port: TestDynamicPort_SendMail(Microsoft.XLANGs.BaseTypes.Address)="mailto:test@test.com";
  7. Send the Message to the port and deploy the solution.
  8. In BizTalk Explorer edit the automatically created SendPort and choose your MIME Encoding Pipeline from Step 1.
  9. In BizTalk Administration Console check the the Config Settings for your SMTP adapter. (Servername and From)
  10. Check the properties of your SMTP Server (localhost needs relay permissions)

Note: The solutions in my posts may be the reason for specific errors but there is no guarantee because there are a lot of different system configurations and therefore many reasons for errors exist. But maybe they are useful hints.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
«December»
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567