开发者

Sending Periodically Email From Asp.Net [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

开发者_高级运维

Closed 3 years ago.

Improve this question

I want to send an email to the admin from my asp.net web application daily at 8:00 am. How to send an email that I know. But how to send it periodically that I doubt. Not through SQL Server. I have written my logic in Application_Start in Global.asax Is this is right?


  • Use Quartz Scheduler.
  • Or write a windows service that can do this for you,
  • Or register to call your asp.net page that sends the email in Windows Scheduler everyday at 8 AM.


You have a page with the logic to send mail but which doesn't send response to the client. Or you can send some response like a success message or whatever you like.

Or instead of a page a web service method would do fine.

Once you have either setup and in production, you need to write a vbscript (*.vbs) which makes a call to the web service or aspx page url. You'll have to schedule this script to run periodically using the windows scheduler (Start -> Run -> Type "tasks" in the run dialog).

Or you'd have to use write a windows service which would do the same thing. You'd have to make use of Timers, HttpWebRequest, and HttpWebResponse classes inside the service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜