Hi,
I am wondering if it is possible to send an email before a certain date? To explain a bit more we have talks that run every month on the second wednesday of the month and they have a title and speaker. I would like to email the members(email addresses stored in member object) 2 weeks before each meeting so on the first of the month yet get this months talk. So is this possible? The dates for each talk are stored in the talk objects. The basic outline of the email would just consist of the information in this months talk object.
Thanks in Advance,
Dean
views:
35answers:
2
+3
A:
You can use a cron job or, better yet, a message queuing service such as RabbitMQ or ZeroMQ. Celery is a project that wraps these message queuing services in a python/django module.
The way it would work is you'd write a function that would do your database queries and figure out which messages to send. You'd then decorate this function as a task and set a delayed execution time on it.
Soviut
2010-09-17 20:24:44
Would this be able to extract the information from the Database so that it can email the correct data?
Dean
2010-09-17 20:25:36
I updated my answer to help answer your question.
Soviut
2010-09-17 21:07:04
+1
A:
Write a custom management command, that goes over the month talk objects, checks if there are talks scheduled for the next two weeks and sends email to the right members, and then run that command using a cron job every day.
Ofri Raviv
2010-09-17 20:34:30