Using loops, how can I send e-mail reminders everyday until a certain date has been established?
This is a rental application.
I am having trouble setting up a loop to where it keeps on sending the customer an e-mail message reminder of their past due item every day until they have returned their item.
I need a loop that runs and executes the code below and stops once the customer's Actual Check In Date is reached (ActualCheckInDate)
Here is my function code so far:
- void emailoverduereminder.EMailOverdueReminder()
- {
- // Please write your Form name here, which having record that dues deadline
- for each fetch_rec in Client_Listings [(ID is not null)]
- {
- Trigger_Date = zoho.currentdate;
- Deadline_Date = fetch_rec.Check_IN_DUE_Date;
-
-
- // Please use here your form field name which contain that due date on which the email have to be triggered
- // checking require triggering date
- if (Deadline_Date < Trigger_Date)
- {
- sendmail
- (
- To : fetch_rec.Email_Address
- From : zoho.adminuserid
- Subject : "Your Tiger Bike Is Overdue!!"
- Message : "<span style=\"color: rgb(51, 51, 153);\">According to our records, your Tiger Bike is overdue. Please return your bike to the University of Memphis Bike Shop. There is a $10.00 late fee for each day the bike is past due.<br />\n<br />\nTiger Bikes<br type=\"_moz\" />\n</span>"
- )
- // Write your require information in the blue highlighted Email message.
- }
- }
- }