Using the SMTP Task

The SMTP Task is used to send emails. There are four pages of configuration:

  • General
  • Content
  • Attachments
  • Error Handling

General Page

The General page of the SMTP Task component allows you to specify the general settings of the component.

SMTP Task Editor

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 sender's name. This field is required.

Sender Address

The sender's email address. This field is required.

Recipient Settings
Recipient(s)

The recipient email addresses. Delimit multiple with semi-colons (;). This field is required.

Cc:

The Cc email addresses. Delimit multiple with semi-colons (;). This field is required.

Bcc:

The Bcc email addresses. Delimit multiple with semi-colons (;). This field is required.

Content Page

The Content page of the SMTP Task component allows you to specify the content settings of the email.

SMTP Task Editor - Content

Subject

The subject of the email. This field is required.

Priority
The priority of the email. The following options are available:
  • Low
  • Normal
  • High
Encoding
The encoding of the subject and the body of the email.
Body

The body of the email.

Is Body HTML

If checked, the body of the email will be rendered as HTML.

Launch Advanced Editor

When clicked, a new dialog will open that is similar to the HTML Merge component. Here you can design and preview the HTML body and even merge variable values.

Attachments Page

The Attachments page of the SMTP Task component allows you to configure the attachment settings of the email. Add attachments by clicking the green '+' and remove attachments by clicking the red '-'.

SMTP Task Editor - Attachments

Name

The name of the attachment. Note the name should include the desired file extension (.txt, .png, etc).

Path

The path to the file you wish to attach to the email. 

Note: From v23.1 onwards, the Path can be from local file systems or an URL that requires no authentication (essentially an URL that works with anonymous authentication).

Error Handling Page

The Error Handling page of the SMTP Task component allows you to specify how the component handles errors.

SMTP Task Editor - Error Handling

The only option is Continue On Error. If this is true and an error occurs a warning will be fired but package execution will resume.