Hi, I’m working on on this app and wanted to get some thoughts on if my approach is sound or if another option is more viable.
The goal is to let users schedule emails to send out at a later specified date/time…
My basic idea on tackling this problem is to:
- Create a collection for the “scheduled emails”.
- When an email is scheduled by a user, it would call a server method to:
- Add the email object (to, from, etc…) to the collection
- start a
- When timeout completes, it would send the mail and remove the item from collection.
There would also be a piece that would look if there are items in the collection on start up ( in case of crash or whatever ) and create new timeouts for each.
I’ve never done anything like this so I’m not sure if timeout is the right approach or how to accomplish that particular piece. Setting day long timeouts seems… I dunno bad? Thoughts? Thanks!