首页 > 解决方案 > 是否可以从 SSIS 中的数据流窗格发送邮件

问题描述

在 SSIS 中,我们可以使用数据流输出列发送电子邮件。如果满足条件,我想发送电子邮件。我想有可能吗?如果有可能,那么我们该怎么做呢?

如果有人知道,请告诉我..提前谢谢!

标签: ssisetlsendmaildataflowtask

解决方案


正如@TabAlleman 提到的,唯一的方法是使用脚本组件。您可以参考以下链接以使用 C# 脚本发送电子邮件:

System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add("luckyperson@online.microsoft.com");
message.Subject = "This is the Subject line";
message.From = new System.Net.Mail.MailAddress("From@online.microsoft.com");
message.Body = "This is the message body";
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("yoursmtphost");
smtp.Send(message);

代码参考

类似问题


推荐阅读