This Django app offers a reusable solution to queue the delivery of emails. It streamlines the process of email sending and offers a more efficient approach to managing email communications.
Here are some sample use cases for Django-mailer:
- Sending one-off announcements to all users on a site
- Sending emails to specific subsets of users
- Scheduling emails to be sent at a particular date or time
- Sending regular emails to a subset of users
- Notifying users of events relevant to them
- Creating email digests for users who don't want individual notifications
It's important to note that Django-mailer shouldn't manage subscriptions to events. For instance, if a user subscribes to a message board thread, the overall site should keep track of this information. Django-mailer would simply be asked to send the same message to that list of users.
Putting email on the queue is easy with Django-mailer. If you prefer to use it, simply fall back to Django's core mail support. You can call send_mail like you usually would in Django. Additionally, you can use mail_admins and mail_managers to send emails to all admins or managers.
To clear the queue and send emails, Django-mailer comes with two new manage.py commands: send_mail and retry_deferred. You can run these commands regularly via cron to ensure that emails are sent on time. Manage.py send_mail even comes with a lock file to prevent queue clearing from taking too long.
Overall, Django-mailer is an excellent tool for managing email tasks in Django. Despite its asynchronous nature, it's easy to set up and use, making it a popular choice amongst developers.
Version 0.1.0: N/A