|
SSIS Send HTML Email Task can be used to send any news letters or great looking HTML emails from SSIS. It support SMTP connection with UserID/Password so you are not stuck with your company email server. Auto expanding placeholders can make it super easy to create flexible email templates in few minutes without messing up with SSIS expressions.
|
Video Tutorial
Coming soon...
Step-By-Step
In this tutorial we will learn how to send email from Internet using SSIS HTML Email Task with just few clicks (In this case using SQL Server Table).
-
Firstly, You need to Download and Install SSIS ZappySys PowerPack.
-
Once you finished first step, Open Visual Studio and Create New SSIS Package Project.
-
Let's, Drag and Drop Execute SQL Task and ZS HTML Email Task from SSIS Toolbox.
-
We need SMTP Connection, OLE DB Connection and Variables for this task.
How to create SMTP Connection.
-
Right click on Connection Managers Panel and Context Menu will appear, Select New Connection from the Context Menu.
-
Select ZS-SMTP Connection Manager from the Connection Managers list and Click on Add Button.
-
In the connection manager UI, enter smtp server and uncheck on Anonymous Authentication. Enter your correct User Name and Password and enter Test Email.
-
Click on Test Connection to check configure correct.
-
Click on OK button to save SMTP connection configure setting UI.
How to create Variables and OLE DB connection.
-
Let's Create Variables, In Visual Studio Right Click on Design Panel, Select Variables.
-
Create Variable varResult with Object DataType, use following image.
-
Now, lets create OLE DB Connection.
-
Let's, Right click on Connection Managers Panel to Create OLEDB Connection, so you can use Source and Context Menu will appear, Select New OLEDB Connection from the Context Menu.
-
Now, click on New Button for create Connection.
-
Let's Configure Connection Manager, just Follow steps one by one as we have created.
-
Click on OK button to save connection configure setting UI.
How to send email using HTML Email Task.
-
Double click on Execute SQL Task to configure it.
-
In the General Tab, set ResultSet to Full result set and connection type to OLE DB. Select connection and write SQL Query.
-
In the Result Set Tab, click on Add button and Set Result Name as 0 and select your desired object type variable we have created before.
-
Click on OK button to save Execute SQL Task configure setting UI.
-
Now, double click on HTML Email Task to configure it.
-
Select SMTP connection we have created before. In General Tab enter correct information. In the body content Select variable and placeholder.
-
Now, you can Edit email Style if you want.
-
Now, click on Preview button to see Email Preview.
-
Click on OK button to save HTML Email Task configure setting UI.
-
Thats all, SSIS Send HTML Email Task - Email Sent (See recordset variable turned into HTML Table, See how date and Currency formatted)
Properties
Property Name |
Description |
SmtpConnection |
Specifies SMTP connection manager for sending email |
IsHtmlEmail |
Specifies whether email is in Plain Text or HTML format |
DefaultStyle |
Default CSS Style for tables generated from recordset. Set this according to your need. |
Subject |
Specifies subject line of email |
From |
Specifies FROM address for email. |
To |
Specifies TO address for email. Can be comma separated if you have multiple email addresses. |
Cc |
Specifies CC address for email. Can be comma separated if you have multiple email addresses. |
Bcc |
Specifies BCC address for email. Can be comma separated if you have multiple email addresses. |
Attachments |
Specifies file(s) you want to attach with your email. Use vertical bar if you want to attach multiple files |
EmailPriority |
Specifies email priority |
MessageSourceType |
Specifies how to read email body text. It can be from variable, from file or direct input |
MessageDirectValue |
Specifies email body text. Only applicable when MessageSource is DirectValue. |
MessageFileConnection |
Specifies connection which points to the email template file path. Only applicable when MessageSource is Connection. |
MessageVariable |
Specifies SSIS variable name which holds email body text. Only applicable when MessageSource is Variable. |
LoggingMode |
LoggingMode determines how much information is logged during Package Execution. Set Logging mode to Debugging for maximum log. |
Setting UI
Copyrights reserved. ZappySys LLC.