Hello,
I want to know how to send an email at the time and date that the user who used that application have choose.
In my case, I will fill out a form and enter a date and time, after which I must send an email based on that Date and Time
Hi,
So for this assuming you are storing date time already. If not then you can create a table to have the records of email reminder date time and other details as well if required according to your business logic.
Then you can create a timer, sort above entity according to latest date time on top. So this way timer will trigger. Once email send. Pick second entry from the entity and reschedule timer according to this date time.
regards
Just an extra note: every time you create a new mail, you need to recheck the timer start time. Just in case it needs to be earlier.
Unless you have a bunch of such emails and makes sense to have the timer always running (every 5 minutes is the minimum) and check each time on DB which emails should be sent.
Why you don't use a BPT?
Use the wait and set the close on property to schedule date-time
and next send the email