如何自动发送电子邮件 [英] How to send email automaically

查看:109
本文介绍了如何自动发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

目前,我正在网站上工作,用户成为我们网站的成员。用户可以获得我们网站的会员资格,为期1个月或1年。我必须在用户成员资格到期前2,3和7天自动发送电子邮件才能升级其会员资格。我不知道怎么可以根据他的会员资格到期日自动发送电子邮件。我正在使用一个包含Membershipexpiry列的表,其中包含用户成员资格过期的日期.Plz帮助我编写代码如何自动发送邮件以及我应该在主页中的哪个位置编写代码。

Hello,
Currently, I'm working on website in which an user become member of our site.User gets membership for our site either for 1 month or for 1 year. I have to send email automatically 2, 3 and 7 days before user membership get expired in order to upgrade his membership . I don't know how can send an email automatically according to his membership expiry dates. I am using a table which contains a column Membershipexpiry which contains the date on which user membership gets expired.Plz help me to write the code how to send mail automatically and where should I write that code either in home page or not.

推荐答案

对于自动化的东西,你需要Windows服务或任务调度程序。

看看 Web服务 [ ^ ]& Windows服务 [ ^ ]

对于提醒事项,请检查过去回答提醒相关文章 [ ^ ]
For automatic things, you need windows service or Task scheduler.
Take a look at Web Service[^] & Windows Service[^]
And for reminder things, check this past answer Reminder related articles[^]






在我的项目中,我使用单独的C#项目发送电子邮件,我建议你也这样做。

你可能会参考这些 link1 [ ^ ]和 link2 [ ^ ]。

希望这会有所帮助你好一点。



问候,

RK
Hi,

In my project I use separate C# project to send email,I suggest you to do the same.
You may have some reference in these link1[^] and link2[^].
Hope this helps you a bit.

Regards,
RK


这篇关于如何自动发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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