Incuna Mail

Pythonic utility for sending template based emails with Django.
Installation
Install the package:
pip install incuna_mail
Usage
Import the send function and call it:
from incuna_mail import send
send(
to='foo@example.com',
subject='Example email',
template_name='plaintext_email.txt',
)
Supports cc and bcc...
send(
to='foo@example.com',
cc='bar@example.com',
bcc='baz@example.com',
...
)
... lists of recipients...
send(
to=['foo@example.com', 'bar@example.com'],
cc=['spam@example.com', 'eggs@example.com'],
...
)
... multi-part emails...
send(
...
template_name='plaintext_email.txt',
html_template_name='html_email.html',
)
... template context...
send(
...
context={'user': user},
)
... template lists...
send(
...
# Uses the first template found.
template_name=['might-exist.html', 'will-exist.html'],
)
... reply-to addresses...
send(
...
reply_to=['another@example.com'],
)
... and custom email headers:
send(
...
headers={'Extra-Header': 'This will appear among the email headers'}
)
The email sender can be set globally with settings.DEFAULT_FROM_EMAIL, and will default to settings.SERVER_EMAIL. It can be explicitly set on each call, if required:
send(
...
sender='eggy-mcspambot@example.com',
)
Metadata
Release files for incuna-mail 4.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| incuna-mail-4.1.1.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| incuna_mail-4.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / incuna-mail-4.1.1.tar.gz
| Download URL | incuna-mail-4.1.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4071949a7cc70f88c1acea5f06ac8ba439029f655ff5d8c98277bbc8cc8d4bd5
|
|
BLAKE2b-256 checksum How to use checksums |
873b175b1b5733f1018fdf88cb59a28a0177fa6cf73744014facfad076115340
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.8
|
Release files / incuna_mail-4.1.1-py2.py3-none-any.whl
| Download URL | incuna_mail-4.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d8ef4979264fba729fa1478819d71f66af17a795e82d9607d8e7ccd7edaafe10
|
|
BLAKE2b-256 checksum How to use checksums |
c813a79641f5b0cb39111d4427a3becd2ec755fd6b7c8886d1da928f6310ecf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.8
|