Send Mail Task

SQL Server 2005, 2008, 2008R2, 2012, 2014

SQL Server 2005, 2008, 2008R2, 2012, 2014

All Downloads ----- Questions?

Overview

The Send Mail Task Plus is an SSIS Control Flow task for sending e-mail. The task can also S/MIME sign and encrypt e-mails.


Setup

Use the General page of the Send Mail Task Editor dialog to configure the parameters desired for sending e-mails.

Parameters

Name

Specify the task name.

Description

Specify the task description.

IsNewMail

Indicate whether or not the task creates new mail. This parameter has the options listed in the following table.

Option Description
True The task creates new mail. Selecting this option displays the dynamic parameters From, IsSubjectVariable, Subject, SubjectVariable, ToSource, ToDirect, ToFile, ToVariable, CcSource, CcDirect, CcFile, CcVariable, BccSource, BccDirect, BccFile, BccVariable, HeadersSource, HeadersDirect, HeadersFile, HeadersVariable, BodyTextSource, BodyTextDirect, BodyTextFile, BodyTextVariable, BodyHtmlSource, BodyHtmlDirect, BodyHtmlFile, BodyHtmlVariable, Priority, IsAttachmentVariable, Attachment, AttachmentVariable.
False The task loads existing mail. Selecting this option displays the dynamic parameters IsSourceVariable, Source, SourceVariable.
From

Specify the mail sender’s e-mail address.

IsSubjectVariable

Indicate whether or not the e-mail’s subject line is stored in a variable. This parameter has the options listed in the following table.

Option Description
True The e-mail’s subject line is stored in a variable. Selecting this option displays the dynamic parameter SubjectVariable.
False The e-mail’s subject line is specified directly. Selecting this option displays the dynamic parameter Subject.
Subject

Specify the e-mail’s subject line.

SubjectVariable

Specify the variable in which the e-mail’s subject line is stored. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

ToSource

Specify the source of the e-mail’s recipients. This parameter has the options listed in the following table.

Option Description
Direct input The e-mail recipients are specified directly. Selecting this option displays the dynamic parameter ToDirect.
File connection The e-mail’s recipients are loaded from a file. Each e-mail recipient can be on a separate line. Selecting this option displays the dynamic parameter ToFile.
Variable The e-mail’s recipients are loaded from a variable. Selecting this option displays the dynamic parameter ToVariable.
ToDirect

Specify the e-mail’s recipients. Each e-mail recipient is separated with a semicolon (;).

ToFile

Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

ToVariable

Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

CcSource

Specify the source of the copied (CC’d) e-mail recipients. This parameter has the options listed in the following table.

Option Description
Direct input Copied (CC’d) e-mail recipients are specified directly. Selecting this option displays the dynamic parameter CcDirect.
File connection Copied (CC’d) e-mail recipients are loaded from a file. Each copied e-mail recipient can be on a separate line. Selecting this option displays the dynamic parameter CcFile.
Variable Copied (CC’d) e-mail recipients are loaded from a variable. Selecting this option displays the dynamic parameter CcVariable.
CcDirect

Specify the e-mail recipients to be copied (CC’d). Separate each recipient with a semicolon (;).

CcFile

Specify the file from which to load the recipients to be copied (CC’d) on the e-mail. Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

CcVariable

Specify the variable from which to load the recipients to be copied (CC’d) on the e-mail. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

BccSource

Specify the source for the e-mail recipients to be blind copied (BCC’d); these recipients will not be revealed. This parameter has the options listed in the following table.

Option Description
Direct input Blind-copied (BCC’d) e-mail recipients are directly specified. Selecting this option displays the dynamic parameter BccDirect.
File connection Blind-copied (BCC’d) e-mail recipients are loaded from a file. Specify each e-mail recipient on a separate line. Selecting this option displays the dynamic parameter BccFile.
Variable Blind-copied (BCC’d) e-mail recipients are loaded from a variable. Selecting this option displays the dynamic parameter BccVariable.
BccDirect

Specify the e-mail recipients to be blind-copied (BCC’d). Separate each recipient with a semicolon (;).

BccFile

Specify the file from which to load the recipients to be blind-copied (BCC’d) on the e-mail. Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

BccVariable

Specify the variable from which to load the recipients to be blind-copied (BCC’d) on the e-mail. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

HeadersSource (1.6 SR-1)

Specify the source for the e-mail headers. This parameter has the options listed in the following table.

Option Description
Direct input e-mail headers are directly specified. Selecting this option displays the dynamic parameter HeadersDirect.
File connection e-mail headers are loaded from a file. Selecting this option displays the dynamic parameter HeadersFile.
Variable e-mail headers are loaded from a variable. Selecting this option displays the dynamic parameter HeadersVariable.
HeadersDirect (1.6 SR-1)

Specify the e-mail headers. The parameter should be specified as header name to value text, where each header is separated with newline like:

header1=value1
header2=value2
...

HeadersFile (1.6 SR-1)

Specify the file from which to load the e-mail headers. Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

HeadersVariable (1.6 SR-1)

Specify the variable from which to load the e-mail headers. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

BodyTextSource

Specify the source for the text in the body of the e-mail. This parameter has the options listed in the following table.

Option Description
Direct input The text for the body of the e-mail is specified directly. Selecting this option displays the dynamic parameter BodyTextDirect.
File connection The text for the body of the e-mail is loaded from a file. Selecting this option displays the dynamic parameter BodyTextFile.
Variable The text for the body of the e-mail is loaded from a variable. Selecting this option displays the dynamic parameter BodyTextVariable.
BodyTextDirect

Specify the text for the body of the e-mail.

BodyTextFile

Specify the file from which to load the text for the body of the e-mail. Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

BodyTextVariable

Specify the variable from which to load the text for the body of the e-mail. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

BodyHtmlSource

Specify the source of the HTML for the body of the e-mail. This parameter has the options listed in the following table.

Option Description
Direct input The HTML for the body of the e-mail is specified directly. Selecting this option displays the dynamic parameter BodyHtmlDirect.
File connection The HTML for the body of the e-mail is loaded from a file. Selecting this option displays the dynamic parameter BodyHtmlFile.
Variable The HTML for the body of the e-mail is loaded from a variable. Selecting this option displays the dynamic parameter BodyHtmlVariable.
BodyHtmlDirect

Specify the HTML for the body of the e-mail.

BodyHtmlFile

Specify the file from which to load the HTML for the body of the e-mail. Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

BodyHtmlVariable

Specify the variable from which to load the HTML for the body of the e-mail. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

Priority

Specify the priority of the e-mail. These are the available options: Low, Normal, High.

IsAttachmentVariable

Indicate whether or not the list of e-mail attachments is stored in a variable. This parameter has the options listed in the following table.

Option Description
True The list of e-mail attachments is stored in a variable. Selecting this option displays the dynamic parameter AttachmentVariable.
False The list of e-mail attachments is specified directly. Selecting this option displays the dynamic parameter Attachment.
Attachment

Specify the list of e-mail attachments. Separate each attachment with a semicolon (;).

AttachmentVariable

Specify the variable from which to load the list of e-mail attachments. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

IsSigned

Indicate whether or not the e-mail must be signed. This parameter has the options listed in the following table.

Option Description
True The e-mail must be signed. Selecting this option displays the dynamic parameters IsPrivateKeyVariable, PrivateKey, PrivateKeyVariable, Password.
False The e-mail should not be signed.
IsPrivateKeyVariable

Indicate whether or not the private key file path is stored in a variable. This parameter has the options listed in the following table.

Option Description
True The private key file path is stored in a variable. Selecting this option displays the dynamic parameter PrivateKeyVariable.
False The private key file path is specified in a File connection manager. Selecting this option displays the dynamic parameter PrivateKey.
PrivateKey

Specify the file containing the private key. Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

PrivateKeyVariable

Specify the variable containing the private key. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

Password

Specify the private key password.

IsEncrypted

Indicate whether or not the e-mail should be encrypted. This parameter has the options listed in the following table.

Option Description
True The e-mail should be encrypted. Selecting this option displays the dynamic parameters IsCertificateVariable, Certificate, CertificateVariable.
False The e-mail should not be encrypted.
IsCertificateVariable

Indicate whether or not the certificate file path is stored in a variable. This parameter has the options listed in the following table.

Option Description
True The certificate file path is stored in a variable. Selecting this option displays the dynamic parameter CertificateVariable.
False The certificate file path is specified in a File connection manager. Selecting this option displays the dynamic parameter Certificate.
Certificate

Specify the File connection manager from which to obtain the file path of the certificate. Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

CertificateVariable

Specify the variable from which to obtain the file path of the certificate. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

Location

Indicate the delivery location of the e-mail. This parameter has the options listed in the following table.

Option Description
Server The e-mail is to be delivered to a mail server. Selecting this option displays the dynamic parameter Connection.
File The e-mail is to be saved as a file. Selecting this option displays the dynamic parameters IsTargetVariable, Target, TargetVariable, OverwriteExisting.
Connection

Specify the mail server to which the e-mail is to be delivered. Select an existing connection manager, or click <New connection...> to create a new connection manager.

Related topics: SMTP Connection Manager Editor, Exchange Connection Manager Editor

IsTargetVariable

Indicate whether or not the target file path is stored in a variable. This parameter has the options listed in the following table.

Option Description
True The target file path is stored in a variable. Selecting this option displays the dynamic parameter TargetVariable.
False The target file path is specified in a File connection manager. Selecting this option displays the dynamic parameter Target.
Target

Specify the File connection manager in which the e-mail is to be stored. Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

TargetVariable

Specify the variable in which the e-mail is to be stored. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

OverwriteExisting

Specify whether or not an existing e-mail file can be overwritten with the newly created e-mail file. This parameter has the options listed in the following table.

Option Description
True If an existing e-mail file exists, it will be overwritten by the newly created e-mail file.
False If an existing e-mail file exists, it will not be overwritten by the newly created e-mail file and a warning message will be generated in the log file.