开发者

Sending Periodically Email From Asp.Net [closed]

开发者 https://www.devze.com 2023-01-05 16:49 出处:网络
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
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

精彩评论

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

关注公众号