Python Django Mail Queue
Sep 29, 2015

If you ever need to send many emails at once, an email queue system will reduce the strain on your web server by sending emails a few minutes later in a separate process (usually). After some searching I found an easy to use one called post_office.

The configuration is very simple and emails get sent using a cronjob. It doesn’t require Celery/RabbitMQ or anything else. I won’t bother posting any configuration details because the GitHub page contains everything you could possibly want.

[INFO]2015-09-29 13:37:11 PID 2014: Acquiring lock for sending queued emails at /tmp/post_office.lock
[INFO]2015-09-29 13:37:11 PID 2014: Started sending 2 emails with 1 processes.
[INFO]2015-09-29 13:37:11 PID 2014: Process started, sending 2 emails
[INFO]2015-09-29 13:37:13 PID 2014: Process finished, 2 attempted, 2 sent, 0 failed
[INFO]2015-09-29 13:37:13 PID 2014: 2 emails attempted, 2 sent, 0 failed
Comments