Email options
So i’ve been getting to grips with Action Mailer. I’m absolutely delighted how quickly i’ve put together a simple contact form … and it’s even better that it stores all messages in the database, just in case the email goes missing.
The email example i copied was to send an email to the user after registering to say thank you and give a bit of information about the site. I thought that was a pretty good idea so i’ve done that too!
Neither of these tasks were on my to-do list, but they have helped me understand Action Mailer ready for the big task of daily/weekly notifications!
I envisage getting CRON to call a function that will loop through each user in turn, check if they want emails, if so, find their tasks (overdue and due today) and if it finds any, send an email.
Some day i’ll have to think about timezones and work out what would be a sensible time to send the email … but i think i won’t worry about that just yet. For now i think i’ll aim to send all emails out at 4am UK time, so they’re ready for the morning when people will check their email.