如何在注册30天后通知用户 [英] How To Notify Users After 30 days of registration

查看:72
本文介绍了如何在注册30天后通知用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天,



请有人帮助我。



我有一个 datecreated 的数据库列。我编写了简单的脚本来获取总天数,即将 datecreated datetime.today 进行比较,如果区别是> = 30然后向用户发送邮件



脚本是:

Good Day all,

Please some one help me out here.

I have a database column for datecreated. I have written simple script to get the total number of days, that is comparing the datecreated to datetime.today, if the difference is >= 30 then send a mail to the user

The script is:

string datecreated = Convert.ToString(Session["datecreated"]);
            DateTime dt3 = DateTime.Parse(datecreated);
            DateTime dt4 = DateTime.Today;
            TimeSpan tp = dt4.Subtract(dt3);
            int bs = tp.Days;



脚本给出总天数。

如果 tp.days>服务器如何自动向用户发送电子邮件? = 30

特别是当用户没有登录时。



谢谢


The script gives the total days.
How can the server automatically send email to the user if tp.days > = 30?
Especially when the user is not logged in.

Thanks

推荐答案

您可以编写一个控制台应用程序,该应用程序继续运行并使用一些公式检查数据库,以便根据日期时间(-30)天获取电子邮件地址,然后向它们发送电子邮件。

这将是一个连续运行的应用程序,如工作..
you can write a console application which keeps on running and checking the db with some formula for getting email addresses based on date time(-30) days, and then send emails to them..
this will be a continuous running application like a job ..


这篇关于如何在注册30天后通知用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆