How do I use a variable in the TO feild of the SSIS Send Mail Task

  • I want to use an Execute SQL Task to load an email address list from a table

    and use the variable in the TO field in the Send Mail Task. Got the list

    into a variable okay, but can't figure out how to make it work as the TO in

    Send Mail.

    The way I am doing it is to leave the TO field blank and map the ToLine to the variable (available to the package) in the expressions tab of the send mail task. But I get the error:

    Error at Send Mail Task [Send Mail Task]: No recipient is specified.

    How can I make this work?

    Thanks!

  • U shud use varibales in all the fields

    [font="Comic Sans MS"]
    ---------------------------------------------------

    Thanks [/font]

  • Its actually trying to validate the ToLine thats the reason its showing the warning, if you set the DelayValidation property to true then it won't show the warning and the Send Mail task should work fine.

    Hope this helps.

    ~Mukti

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply