Drymail is a minimalist wrapper over Python’s existing smtplib and email libraries, designed to be friendly but unrestrictive.
Project description
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-To
andAuthors
. - 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
Message
class 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file drymail-0.0.6.tar.gz
.
File metadata
- Download URL: drymail-0.0.6.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c14e0d69e0a1841a1d99849919fe1fa9862f2b941cecf34369cb5a6d21f38cf |
|
MD5 | adabbf4694a0c84df84d8bf0235b4e80 |
|
BLAKE2b-256 | e52730ca86b216007ec850f542acab21789c8c4b2f364857f40936797f100975 |
File details
Details for the file drymail-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: drymail-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c7c0564fd5f60cf487c236d2e813c6a4d27c6f2457759e24405957ffc45f314 |
|
MD5 | fd65008e829b169a42aefd828607a0b7 |
|
BLAKE2b-256 | a0e314117dc5c12b6c8eee55c1461b88bc5b9dccea516c3da48f95da34929c44 |