drymail
Makes sending emails easy and DRY — For Python 3.
Drymail is a minimalist wrapper over Python’s existing smtplib and email libraries, designed to be friendly but unrestrictive. Here’s how you might send a simple email with an attachment using drymail.
from drymail import SMTPMailer, Message
client = SMTPMailer(host='smtp.email.com', user='johndoe', password='password', tls=True)
message = Message(subject='Congrats on the new job!', sender=('John Doe', 'john@email.com'),
receivers=[('Jane Doe', 'jane@message.com'), 'jane.doe@mail.io'], text='When is the party? ;)')
with open('congrats.pdf', 'rb') as pdf_file:
message.attach(filename='congrats.pdf', data=pdf_file.read(), mimetype='application/pdf')
client.send(message)
Features
- Supports creating email with HTML content, plaintext content, or both!
- Supports mentioning contacts in the
“John Doe" <john@email.com>format. - Support standard headers like
CC,BCC,Reply-ToandAuthors. - Supports injecting custom headers.
- Supports adding attachments.
- And most importantly — the library being minimalist, it doesn’t restrict you in any way like some of the most fancier email frameworks do.
Installation
Install drymail by running —
$ pip3 install drymail
Documentation
Documentation is available at https://drymail.readthedocs.io/
Agenda
- Test suite.
- Restructure the
Messageclass to handle dynamicprepare.
Contribute
All kinds of contribution are welcome.
- Issue Tracker — https://github.com/drymail/issues
- Source Code — https://github.com/drymail
License
This project is licensed under the MIT license.
Release files for drymail 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| drymail-0.0.6.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drymail-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / drymail-0.0.6.tar.gz
| Download URL | drymail-0.0.6.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c14e0d69e0a1841a1d99849919fe1fa9862f2b941cecf34369cb5a6d21f38cf
|
|
BLAKE2b-256 checksum How to use checksums |
e52730ca86b216007ec850f542acab21789c8c4b2f364857f40936797f100975
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / drymail-0.0.6-py3-none-any.whl
| Download URL | drymail-0.0.6-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c7c0564fd5f60cf487c236d2e813c6a4d27c6f2457759e24405957ffc45f314
|
|
BLAKE2b-256 checksum How to use checksums |
a0e314117dc5c12b6c8eee55c1461b88bc5b9dccea516c3da48f95da34929c44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|