Simple Mail Queuing Backend for Django
Project description
Installation
You must have setuptools installed.
From PyPI:
pip install django_mailqueue_backend
Or download a package from the PyPI or the BitBucket page:
pip install <package>
Or unpack the package and:
python setup.py install.
Dependencies
Django >= 1.2 and its dependencies.
queues >= 0.6.2 located at: http://code.google.com/p/queues/ or https://pypi.python.org/pypi/queues. Note that queues also has dependencies. See this page for more details.
Integration
In your Django settings.py file insert the following in an appropriate place:
... INSTALLED_APPS = [ ... "mailqueue_backend", ... ] ... EMAIL_BACKEND = "mailqueue_backend.mail.smtp.QueuedEmailBackend" ...
That is it. You should run the following command by any regular means that you prefer (cron, celery, etc):
./manage.py process_mail_queue
Compatibility
This module has been tested with the following:
python 2.7
django 1.4
There is an egg for python 3.3, but it has not been tested. It is a very simple module, so there should not be many issues using python 3.
Advanced
Packages Security
This module, when packaged, is signed with the following key:
Mario Rosa’s Key with id 0x8EBBFA6F (full fingerprint F261 96E4 8EF2 ED4A 26F8 58E9 04AA 48D1 8EBB FA6F) and his email is mario@dwaiter.com
You can find this key on servers like pgp.mit.edu.
Additional Settings
MAIL_QUEUE_NAME
Default: “MAIL_QUEUE”
Set the name of the queue.
MAIL_QUEUE_LOG_FILENAME
Default: “smtp.mail_queue.mail_queue_fail.log”
A log to this file will be made when a message is discarded.
MAIL_QUEUE_LOG_FILE_MAXBYTES
Default: 5242880 (Integer) aka 5MB
Maximum size of a log file.
MAIL_QUEUE_LOG_FILE_BACKUP
Default: 5 (Integer)
Number (n) of files in log rotation. A new backup is created once MAXBYTES is reached in the current log file up to n many log files. The oldest log file is deleted on rotation (i.e. n+1).
MAIL_QUEUE_EXPIRE
Default: 86400 (Integer) aka 1 day
The amount of time in seconds until a failed email is discarded from the queue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-mailqueue-backend-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc70454110847eae32f128c2653d2ae3e1ac1831e1101f29ed4774b3fa4d95fe |
|
MD5 | 127dfda056032873fa993e7d701694e7 |
|
BLAKE2b-256 | 6c002e66a7420ffa984637dcf4e489bdb84b5c11dc53561ef21364ab7dc5ffb8 |