Using the SMTP Destination Component

The SMTP Destination component is used to send emails using column data. There are three configuration pages:

  • General
  • Attachments
  • Error Handling

General Page

Configure general email settings by mapping input columns to an email setting.

SMTP Destination Editor - General Page

Connection Manager

The SMTP Destination Component requires an SMTP connection. The Connection Manager drop-down will show a list of all SMTP connection managers that are available in your current SSIS package.

Sender Settings
Sender Name

The input column that will represent the sender's name. This field is required.

Sender Address

The input column that will represent the sender's email address. This field is required.

Recipient Settings
Recipient(s)

The input column that will represent recipient email addresses. To specify multiple the column data should contain a list of email addresses delimited by semi-colons (;). This field is required.

Cc:

The input column that will represent Cc email addresses. To specify multiple the column data should contain a list of email addresses delimited by semi-colons (;).

Bcc:

The input column that will represent Bcc email addresses. To specify multiple the column data should contain a list of email addresses delimited by semi-colons (;).

Content Settings
Subject:

The input column that will represent the subject of the email. This field is required.

Body:

The input column that will represent the body of the email. This field is required.

Is Body Html:

The input column that will specify if the body should be rendered as HTML. Note the column data should be a Boolean value.

Priority:
The input column that will represent the priority of the email. The column data should be one of the following values:
  • Low
  • Normal
  • High
Encoding:
The input column that will represent the encoding of both the subject and the body of the email. The column data should either be the Code Page value or the .NET Name. Use Code Page Identifiers as a reference.

Attachments Page

Configure attachment settings by mapping input columns to an attachment setting. Click the green '+' to add an attachment and the red '-' to remove it.

SMTP Destination Editor - Attachments

Attachment
Name

The input column that will represent the name of the attachment.

Content

The input column that will represent the content of the attachment.

Error Handling Page

The Error Handling page allows you to specify how errors should be handled when they happen.

SMTP Destination Editor - Error Handling

There are three options available.

  1. Fail on error
  2. Redirect rows to error output
  3. Ignore error

When the Redirect rows to error output option is selected, rows that failed to be sent will be redirected to the 'Error Output' output of the Transformation Component. As indicated in the screenshot below, the green output connection represents rows that were successfully sent, and the red 'Error Output' connection represents erroneous rows. The 'ErrorMessage' output column found in the 'Error Output' may contain the error message that was reported by the server or the component itself.

SMTP Destination Editor - Error Output