Send Mail Task


The Send Mail task sends an e-mail message. By using the Send Mail task, a package can send messages if tasks in the package workflow succeed or fail, or send messages in response to an event that the package raises at run time. For example, the task can notify a database administrator about the success or failure of the Backup Database task.

You can configure the Send Mail task in the following ways:

  • Provide the message text for the e-mail message.

  • Provide a subject line for the e-mail message.

  • Set the priority level of the message. The task supports three priority levels: normal, low, and high.

  • Specify the recipients on the To, Cc, and Bcc lines. If the task specifies multiple recipients, they are separated by semicolons.

    System_CAPS_ICON_note.jpg Note

    The To, Cc, and Bcc lines are limited to 256 characters each in accordance with Internet standards.

  • Include attachments. If the task specifies multiple attachments, they are separated by the pipe (|) character.

    System_CAPS_ICON_note.jpg Note

    If an attachment file does not exist when the package runs, an error occurs.

  • Specify the SMTP connection manager to use.

    System_CAPS_ICON_important.jpg Important

    The SMTP connection manager supports only anonymous authentication and Windows Authentication. It does not support basic authentication.

The message text can be a string that you provide, a connection to a file that contains the text, or the name of a variable that contains the text. The task uses a File connection manager to connect to a file. For more information, see Flat File Connection Manager.

The task uses an SMTP connection manager to connect to a mail server. For more information, see SMTP Connection Manager.

The following table lists the custom log entries for the Send Mail task. For more information, see Integration Services (SSIS) Logging and Custom Messages for Logging.

Log entryDescription
SendMailTaskBeginIndicates that the task began to send an e-mail message.
SendMailTaskEndIndicates that the task finished sending an e-mail message.
SendMailTaskInfoProvides descriptive information about the task.

You can set properties through SSIS Designer or programmatically.

For information about the properties that you can set in SSIS Designer, click one of the following topics:

For information about programmatically setting these properties, click the following topic:

For information about how to set these properties in SSIS Designer, click Set the Properties of a Task or Container.

Integration Services Tasks
Control Flow