SSIS dynamic SMTP mail server RRS feed

  • Question

  • SSIS dynamic SMTP mail server

    Hi All,

    I'm trying to make my SEND MAIL TASK in SSIS dynamic, by retrieving SMTP Server name (amongst other email message information) from a table.

    I've got an SP that is getting the information into package variable's, and when I don't try and have a dynamic server name (i.e. I use a specified SMTP server in my SMPT Server connection), then the email get sent off.

    I'm trying to use an expression to build alter the send mail to use the server name I have in a user variable.

    I've tried using the expression for the property:
    SmtpConnection set to: RTRIM( @[User::MailServer])

    I also tried without the RTRIM - I only added it because the error messages seem to include a full 'string' length, and there doesn't seem to be a 'varchar' data type for SSIS variables.

    a> Is SMTPConnection the property I need to be setting? None of the others seem correct
    b> If SMTPConnection IS the property I need, does the value give the SMTP Server Name, or just the Name of the connection from the Connection Manager's?


    Part-Answer to:
    b> The SMPTConnection property sets the name of the CONNECTION to be used. That Connection needs to set the name of the server. So n ow, the question becomes, how do I configure that from SQL (I know how to use package configurations from XML files).
    Wednesday, September 13, 2006 10:36 AM


  • I posted a different post to address the attempt to get the SMTP Server Name dynamically, now that I've confirmed that the SEND MAIL TASK doesn not have a way of specifying the server name, but only the connection manager.

    Hence I'm marking this one as 'answered'
    Wednesday, September 13, 2006 1:43 PM