Click here to Skip to main content
15,921,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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??
Posted

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.
 
Share this answer
 
v2
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900