如何创建在特定日期发送邮件的计划程序 [英] How To Create a Scheduler which send a mail on particular date
问题描述
我需要在后台连续调用的功能,用于在发件人在我的网站项目中安排的日期或时间发送邮件到收据。
请帮我。如何设置我的日程安排并不断检查发件人设置的针对性事件的日期和时间?
您可以使用 TaskScheduler [ ^ ]
添加对TaskScheduler xx类型库的引用,该库提供对TaskScheduler的访问:
TaskScheduler.TaskScheduler ts = new TaskScheduler.TaskScheduler();
I need function which is called continuously in the background for sending mail to receipt on date or time which is scheduled by the sender in my website project.
但我只是执行该代码作为命令使用Windows任务计划程序的行exe。
你好,
我建议创建一个带有计时器对象的Windows服务,这是可以在Windows服务和计时器对象的事件之间建立直接关系。
如果您需要其他组件的帮助,请添加评论。
祝你好运,
JAFC
Please help me. How do I setup my schedule and continuously check date and time for pertinence event set by sender?You could use the TaskScheduler[^]
Add a reference to the TaskScheduler x.x Type Library, which provides access to TaskScheduler:
TaskScheduler.TaskScheduler ts = new TaskScheduler.TaskScheduler();
and all the other objects in the Task Scheduler API[^]
Best regards
Espen Harlinn
Personally I wouldn''t worry about scheduling in the code. Window''s already has a task scheduler. I''d write your code to check if a mail is to be sent, sends it where required.
But I''d just execute that code as a command line exe using Windows Task Scheduler.
Hello,
I propose to create a windows service with a timer object, which is possible to establish a direct relationship between the events of the windows service and timer object.
If you need help with your other components, add a comment.
Good luck,
JAFC
这篇关于如何创建在特定日期发送邮件的计划程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!