如何在图书归还日期前两天发送电子邮件? [英] how to send email two days prior to book return date?

查看:140
本文介绍了如何在图书归还日期前两天发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在图书归还日期前两天向会员发送电子邮件?这是图书管理系统...我希望会员收到一封电子邮件作为提醒返回书...我有代码发送电子邮件但我如何设置提醒时间和提前两天检查? ?

how to send member an email two days prior to book return date? this is library management system... i want the member to receive an email as a reminder to return book... i've the code to send an email but how can i set a reminder time and two days prior check in it??

推荐答案

根据很多因素,解决方案可能会有很大不同。



你可以开始阅读 https://www.google.de/#q=subtract%20dates&undefined=undefined [ ^ ]



搜索最适合您结构的示例。一种可能性是: http://msdn.microsoft.com/en- us / library / 8ysw4sby(v = vs.110).aspx [ ^ ]





尝试一下,如果遇到问题,回来编辑您的消息,添加新信息/代码片段给出问题。您可以使用改进问题小部件。
Solutions can vary a lot depending on many factors.

You can start reading https://www.google.de/#q=subtract%20dates&undefined=undefined[^]

Search the example fitting best your structure. One possibility could be: http://msdn.microsoft.com/en-us/library/8ysw4sby(v=vs.110).aspx[^]


Try it and if you get problems, come back and edit your message to add the new information / a code snippet giving problems. You can use the "improve question" widget for that.


您可以通过运行 Windows Scheduler 来完成此操作。它只是一个 Window或Console App ,它将在您的服务器中安排。您可以为计划程序选择时间(何时运行)频率(何时再次重复)



在代码中,您将获取记录并根据您的业务规则进行比较。



例如,在您的情况下,您将为每个用户获取记录,并检查当前日期预订返还日期之间的差异是否为2天。



如果差异是2天,则将邮件发送给用户。
You can do this by running a Windows Scheduler. It is nothing but one Window or Console App, which will be scheduled in your Server. You can select the Time(when to run) and frequency(when to repeat it again) for the Scheduler.

In the code, you will fetch the records and compare according to your business rules.

For Example in your case, you will fetch records for each user and check if the difference between Current Date and Book Return Date is 2 days or not.

If difference is 2 days, then send the mail to the user.


这篇关于如何在图书归还日期前两天发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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