https://github.com/xarg/django-emailqueue
Django app for sending queued emails using cron
https://github.com/xarg/django-emailqueue
Last synced: over 1 year ago
JSON representation
Django app for sending queued emails using cron
- Host: GitHub
- URL: https://github.com/xarg/django-emailqueue
- Owner: xarg
- Created: 2010-05-09T10:32:34.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2011-01-08T13:10:23.000Z (over 15 years ago)
- Last Synced: 2025-03-11T02:12:55.611Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 97.7 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
django-emailqueue
=================
Description
-----------
A very simple email queueing module that can be used to send mails using cron.
The sent e-mails are marked as deleted for future reference.
The module now searches every app for cron.py and executes the ``emailqueue`` callable
inside it.
Example appname/cron.py
-----------------------
::
from django_emailqueue.models import EmailQueue
def emailqueue():
reminder = get_reminders()
email_queue = EmailQueue(mail_to=reminder.user.email,
mail_subject="Noitification",
mail_body=render_to_string(
'accounts/reminder.txt',
{'body': reminder.body}
))
email_queue.save()
Installation
------------
easy_install django-emailqueue
Put ``django_emailqueue`` into **INSTALLED_APPS** and make sure you set
**DEFAULT_FROM_EMAIL** and **DEFAULT_REPLYTO_EMAIL** if you want default
email addreses.
Usage
-----
Put this into a cron:
django_emailqueue_cron /path/to/django /path/to/lockdir