根据用户在ASP.net设定定期发送邮件? [英] Sending Periodic Mail according to user's Setting in ASP.net?
问题描述
在我的web应用程序我要为用户根据pre选择时间由自己来发送邮件
的例如:的 1 HTML邮件每3天用户01和1 HTML邮件每20天用户02
我怎么能执行?任何资源?我可以通过我的应用程序从我的Gmail帐户发送邮件到任何邮件地址在我的表,但我不知道如何在一段时间内自动发送了。(我使用C#和SQL前preSS)
帮帮我!
in my web-application I want to send mail for users according to pre selected periods by themselves.
for example: 1 HTML Mail Per 3days to user 01 and 1 HTML Mail Per 20days to user 02
how can I perform that? any resources? I can send mail by my app from My Gmail Account to any mail addresses in my tables but i dont know how to send it automatically in a period of time.(i use C# and SQL Express)
Help me out!
推荐答案
我找到了解决方案
根据我的搜索,我们有三种方式来处理:
I found the Solution.
according to my search we have 3 ways to handle that:
- working with SQL Server to send mail notification in periods of time.(or this)
- using Windows service and Creating
Timer
object and checking the time with it.
但在方式1和2,我们应该可以访问服务器,我们需要专门的托管服务器,例如它安装WINSERVICE。所以它不会在我们平时使用的共享主机空间的工作。于是我找到了最好的方式,你看:
but in ways 1 and 2 we should access to server and we need dedicated hosting server to for example installing WinService on it. so it does not work in a sharing Host space we usually use. So I Found the best way as you see:
  &3. NBSP; 使用ASP 模拟Windows服务.NET缓存计划作业。
3. Simulating Windows Services Using ASP.NET Caching For Scheduled Jobs.
上面的链接是一个了不起的解决方案。因此,有没有需要我们工作的Web应用程序的出边。
the link above is a terrific solution. So there is no need to work out-side of our web application.
这篇关于根据用户在ASP.net设定定期发送邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!