How to create e-mail reminders in Django
I am looking to send e-mail reminders to users X amount of time before a scheduled even. I've been reading through the documentation for django-mailer, which seems to support such scheduled mailing, but am unable to find such functionality in the code.
My thought is to have a script in my project that gets called by cron every severa开发者_C百科l minutes that will will loop through event occurrence objects, check the "lead time" against the current time, and send an e-mail through the default Django e-mail backend if needed. However, I'd like to avoid re-inventing the wheel here if there is an elegant existing solution for scheduling e-mail.
Roll your own.
Sending an email is trivial enough already. The coding required to complete the task will be application specific. What more can a pre-built package offer you? What features did you have in mind? All I can think of is a queryset which returns objects based on an arbitrary timestamp but it would add more complexity than it saves so I don't see much hope.
精彩评论