Here i used System.Net.Mail
assembly to send email notification.
Add a script task in your SSIS package and include this code provided that your smtp server is working.
private void SendMail(
string sendTo,
string from,
string subject,
string body,
bool isBodyHtml,
string SMTPServer,
string userName,
string password,
string domain,
string attachments,
string sendCC)
{
System.Net.Mail.MailMessage oMessage = default(System.Net.Mail.MailMessage);
System.Net.Mail.SmtpClient mySmtpClient = default(System.Net.Mail.SmtpClient);
oMessage = new System.Net.Mail.MailMessage(from, sendTo, subject, body);
oMessage.CC.Add(sendCC);
oMessage.IsBodyHtml = isBodyHtml;
mySmtpClient = new System.Net.Mail.SmtpClient(SMTPServer, 25);
if (string.IsNullOrEmpty(userName))
{
mySmtpClient.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
}
else
{
mySmtpClient.Credentials = new System.Net.NetworkCredential(userName, password, domain);
}
mySmtpClient.Send(oMessage);
}