Class-Based Email for Django built with Mixins
Project description
django-classy-mail
==================
Class Based Email for Django, built on Mixins to support many common use cases
All e-mails are based on a BaseEmail class that builds the MultiPartEmail class
that django provides. This means that you can still use any backend you want.
I like [django-ses](https://github.com/hmarr/django-ses), but you may like
something else.
Get it from [pipi](https://pypi.python.org/pypi/django-classy-mail/)
The simplest usage of the class is to send a one-off e-mail like this:
```python
from classy_mail.generic import SimpleEmail
#create the email
email = SimpleEmail(subject=u'Welcome to mycoolwebsite',to_addr=u'user@example.com', text_content=u'Hello World', from_email=u'Friendly Admin <administrator@mycoolwebsite.io>'')
#Everything gets validated and templated when build_msg is called by send()
email.send()
#You can check things like send status on the object
print email.status
````
Some other mixins to play with:
### FileTemplateMixin
Applies templates stored in your project templates directories
### ModelTemplateMixin
Using the included TemplatedEmail model, you can store templates in the database instead
### SiteContextMixin
Adds the site to the context that will be used to render any template
==================
Class Based Email for Django, built on Mixins to support many common use cases
All e-mails are based on a BaseEmail class that builds the MultiPartEmail class
that django provides. This means that you can still use any backend you want.
I like [django-ses](https://github.com/hmarr/django-ses), but you may like
something else.
Get it from [pipi](https://pypi.python.org/pypi/django-classy-mail/)
The simplest usage of the class is to send a one-off e-mail like this:
```python
from classy_mail.generic import SimpleEmail
#create the email
email = SimpleEmail(subject=u'Welcome to mycoolwebsite',to_addr=u'user@example.com', text_content=u'Hello World', from_email=u'Friendly Admin <administrator@mycoolwebsite.io>'')
#Everything gets validated and templated when build_msg is called by send()
email.send()
#You can check things like send status on the object
print email.status
````
Some other mixins to play with:
### FileTemplateMixin
Applies templates stored in your project templates directories
### ModelTemplateMixin
Using the included TemplatedEmail model, you can store templates in the database instead
### SiteContextMixin
Adds the site to the context that will be used to render any template
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for django-classy-mail-0.1.5.macosx-10.10-intel.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f7305caaea63f0c8242c361b126daf48a89ac738a114679f0bd70a2263114d5 |
|
MD5 | 86d25b05a4dd58d72581513e076d5089 |
|
BLAKE2b-256 | 1f7459c9dc25d95d6049a9a9ef344eb20b8dd193aed75badb4d313f7d527a044 |