"Send Mail Task" does not accept Email address like "Process X <no-reply@abc.com>"

  • I use a lot of email notification with FROM address like: "Process Name <no-reply@abc.com>" , which is very helpful to group emails. Although most SMTP servers support this kind of email address format, but I could not make this work on SSIS. Alternatively, I setup an really email account with expected Alias or use other external mail client to do that, but that is not ideal.

    Any suggestion would be appreciated.

  • I am not sure how to get around that but you could send email from a Script Task directly. You might look at this code:

    Code to send mail for SSIS:

    Dim _oSMTPClient As New SmtpClient("smtpmailhost.yourcompany.com")

    Dim _oMailMsg As New MailMessage()

    _oMailMsg.From = New MailAddress("someemailaddress@yourcompany.com")

    _oMailMsg.To.Add("someotheremailaddress@yourcompany.com")

    _oMailMsg.Subject = "The Subject"

    _oMailMsg.Body = "Message Body"

    _oSMTPClient.Send(_oMailMsg)

    Don't forget:

    Imports System.Net.Mail

    CEWII

  • Too late but might help someone looking for it.

    In the expressions select 'FromLine' and paste your email address with alias

    "Process Name <no-reply@abc.com>"

  • ms_jack - Friday, August 9, 2013 10:49 AM

    Too late but might help someone looking for it. In the expressions select 'FromLine' and paste your email address with alias "Process Name <no-reply@abc.com>"

    Nice tip!  Thanks.

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

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