简体   繁体   English

当通过Windows任务调度程序调用SSIS包时,发送邮件任务在SSIS中不起作用

[英]Send mail task is not working in SSIS when SSIS package is called through windows task scheduler

I have an SSIS package which reads csv files present in a folder and uploads the data into a database. 我有一个SSIS包,它读取文件夹中的csv文件,并将数据上传到数据库中。 It also has a send mail component which is used to send mails after the csv file is read and data is uploaded. 它还有一个发送邮件组件,用于在读取csv文件和上传数据后发送邮件。 This package is called programmatically from a C# console application. 从C#控制台应用程序以编程方式调用此包。 In the console app the package is called one time for each file present in the folder. 在控制台应用程序中,对文件夹中存在的每个文件调用一次包。 This console app is scheduled to run daily at a specific time through the Windows Task Scheduler. 此控制台应用程序计划通过Windows任务计划程序在特定时间每天运行。

The problem I am facing is that when I directly double click on the console app's exe and run it, the data is getting uploaded successfully and the mails are also being sent. 我面临的问题是,当我直接双击控制台应用程序的exe并运行它时,数据上传成功,邮件也被发送。 But when the same console app's exe is called from the Task Scheduler the data from the csv file is getting uploaded successfully but the mails are not being sent (mail functionality is not working in case of scheduler) 但是当从任务计划程序调用相同的控制台应用程序的exe时,来自csv文件的数据将成功上载但邮件未被发送(邮件功能在调度程序的情况下不起作用)

What could be the problem? 可能是什么问题呢?

The most likely cause is a permissions issue; 最可能的原因是权限问题; the account under which the console app runs doesn't have permission to send email while your account does. 运行控制台应用程序的帐户无权在您的帐户运行时发送电子邮件。 Are there any error logs, Windows Event Log entries, etc. generated by the console app? 是否有控制台应用程序生成的错误日志,Windows事件日志条目等?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM