none
How to send email using SMTP depending on Email Address returned from SQL query. RRS feed

  • Question

  • Hi ..

    I am working on solution where i access SQL table to  get email address of employee which i need to using it to send email to employee..

    i checked when i deployed the solution in biztalk in SMTP adapter configure properties i need to manually fill To: field..which i don't require as email id should be the response from SQL ..

    so solution should be either i write class in Biztalk orchestration and include in Reerences..or use SMTP adapter ..but i dont't know how shold i do it..

     

    Pls comment..

    Sandeep

    Monday, June 30, 2008 10:49 AM

Answers

All replies

  • I don't have much experience with the SMTP adapter, and I don't know about the TO address, but I see that the SMTP "CC" property can be set from an Expression shape. You could possibly hardcode the TO address to your own address, and add the real recipient in the CC line.

    Of course, there might be a way to just set the TO address directly, which I don't know about ...

    Monday, June 30, 2008 5:16 PM
  • Ya we cant change the to address unless you use a dynamic

    send port ...and put the load contents reqd in the context...

     

     

    Thursday, July 3, 2008 2:36 PM
  • Here is an example of using an expression shape with a dynamic send port: http://geekswithblogs.net/mapfel/archive/2006/11/24/98761.aspx. In the comments for this article you can find an example of building the same functionality through a .NET class that you could reference in an Expression shape. This other MSDN article provides other valuable information about when this approach can be used: http://msdn.microsoft.com/en-us/library/aa578155.aspx.

     

    Thanks,

    Sunday, July 6, 2008 7:35 PM
    Moderator