I’m sending alert email notifications to users but don’t want to spam them too much. I have the email and logic all setup and the process runs daily, but I would like the process to check and see if the user has been sent an e-mail within the past 3 days. If they have been sent an e-mail, I would like the process to recognize and not send the email. If it has been more than 3 days since they have received an e-mail, I would like it to be sent out. Any thoughts on how to code for this?
Hope below solution will help-
- Create a database table or excel(Let me call it as Tracker) with columns “Sent To” and “Next Email Date”
- Send email
- Add the email ID that you are sending the email to, current date + (your case 3 days) into the Tracker.
- Next day, before sending email to an email ID check whether that email address exists in tracker ?
- If not send email and perform step (3).
- If exists, check current date matches the Next email date in the Tracker.
- If no records found, move to next email.
- If records found, send email and update the Next email date to current date +
Please let me know if this is not what you are looking for.
Thank you! I’m going to try this out tomorrow and let you know how it works out.