Skip to content

Commit

Permalink
Added simple usage instructions to README, and made usage.txt less Pi…
Browse files Browse the repository at this point in the history
…nax specific
  • Loading branch information
spookylukey committed Jan 2, 2014
1 parent 7e525a2 commit b8fd0e0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,16 @@ django-mailer by James Tauber <http://jtauber.com/>
https://github.com/pinax/django-mailer

A reusable Django app for queuing the sending of email

Simple usage instructions:

In settings.py:

EMAIL_BACKEND = "mailer.backend.DbBackend"

In a cron job file:

* * * * * (/path/to/your/python /path/to/your/manage.py send_mail >> ~/cron_mail.log 2>&1)
0,20,40 * * * * (/path/to/your/python /path/to/your/manage.py retry_deferred >> ~/cron_mail_deferred.log 2>&1)

See usage.txt in the docs for more advanced use cases.
6 changes: 6 additions & 0 deletions docs/usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ you can run:

You may want to set these up via cron to run regularly::


* * * * * (/path/to/your/python /path/to/your/manage.py send_mail >> ~/cron_mail.log 2>&1)
0,20,40 * * * * (/path/to/your/python /path/to/your/manage.py retry_deferred >> ~/cron_mail_deferred.log 2>&1)

For use in Pinax, for example, that might look like:

* * * * * (cd $PINAX; /usr/local/bin/python2.5 manage.py send_mail >> $PINAX/cron_mail.log 2>&1)
0,20,40 * * * * (cd $PINAX; /usr/local/bin/python2.5 manage.py retry_deferred >> $PINAX/cron_mail_deferred.log 2>&1)

Expand Down

0 comments on commit b8fd0e0

Please sign in to comment.