Django mailing through admin
Project description
# django-postie
This project allows you to send emails and manage them in the admin panel.
Basic example to use:
```python
# your_module.py
from postie.shortcuts import send_mail
send_mail(
event='MAIL_EVENT',
recipients=['email@email.com', 'email1@email1.com'],
context={
'var1': 'variable context',
'var2': 'another value'
},
from_email='noreply@email.com',
attachments=[{
'file_name': open('path-to-the-file')
}]
)
```
### Available settings
`POSTIE_TEMPLATE_CHOICES` - Tuple of tuples. Where the first value is the
value to use in code and second is stored in DB.
`POSTIE_TEMPLATE_CONTEXTS` - dictionary with template choices as keys and
dictionaries as values
`POSTIE_INSTANT_SEND` - whether to send letters instantly or to use celery
task. If `False` `celery` is required.
TODO:
* Multilanguage letter sending
* Send letter admin action
* etc
This project allows you to send emails and manage them in the admin panel.
Basic example to use:
```python
# your_module.py
from postie.shortcuts import send_mail
send_mail(
event='MAIL_EVENT',
recipients=['email@email.com', 'email1@email1.com'],
context={
'var1': 'variable context',
'var2': 'another value'
},
from_email='noreply@email.com',
attachments=[{
'file_name': open('path-to-the-file')
}]
)
```
### Available settings
`POSTIE_TEMPLATE_CHOICES` - Tuple of tuples. Where the first value is the
value to use in code and second is stored in DB.
`POSTIE_TEMPLATE_CONTEXTS` - dictionary with template choices as keys and
dictionaries as values
`POSTIE_INSTANT_SEND` - whether to send letters instantly or to use celery
task. If `False` `celery` is required.
TODO:
* Multilanguage letter sending
* Send letter admin action
* etc
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
django-postie-0.5.0.tar.gz
(13.9 kB
view hashes)