Setting SMTP connection dinamically by using SSIS expressions

  • Hi,

    in a my SSIS 2005 pkg I need to send email. I'm using the Send Mail task. I'd like to read the smtp server, the fromaddress and the toaddress from a SQL table and then put the related values in some user variables. Using these user variables and the expression mechanism I'd like to set dinamically the Send Mail task. So I've create a table, some user variables and a SMTP connection manager. In the properties of this connection manager I set the connectionstring and the smtpserver by expressions linked to the smtp server user variable, but I've obtained an error about it cannot find the connection.

    I hope in a real sample to use SMTP connection and Send Mail task in a dynamic manner.

    Thanks for your suggests.

  • Are you sure the connection string that you're using is valid?

    I have a similar package which I use to dynamically send the results of an SSIS package execution to different destinations.

    One thing you might want to try is setting the DelayValidation property of the SMTP Connection Manager to True. Sometimes SSIS flips out about that because it doesn't have metadata to use to validate.

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

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