Maildocker library for Python
Project description
This library allows you to quickly and easily send emails through Maildocker using Python.
Example
import maildocker
md = maildocker.MaildockerClient(
api_key='0cc175b9c0f1b6a831c',
api_secret='92eb5ffee6ae2fec3ad'
)
message = maildocker.Mail(
mail_from='Maildocker <maildocker@ecentry.io>',
to='John Snow <john.snow@thrones.com>',
subject='maildocker-python-library',
text='**{{system}}** ({{url}})',
merge_vars={'system': 'Maildocker', 'url': 'http://maildocker.io'},
attachments=[
{'name': 'plaintext.txt', 'type': 'text/plain', 'content': 'dHN0'},
'spreadsheet.xls'
]
)
http_status, response = md.send(message)
# OR
message = maildocker.Mail()
message.set_from('Maildocker <maildocker@ecentry.io>')
message.add_to('John Snow <john.snow@thrones.com>')
message.set_subject('maildocker-python-library')
message.set_text('**{{system}}** ({{url}})')
message.add_vars({'system': 'Maildocker', 'url': 'http://maildocker.io'})
message.add_attachment([
{'name': 'plaintext.txt', 'type': 'text/plain', 'content': 'dHN0'},
'spreadsheet.xls'
])
http_status, response = md.send(message)
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
maildocker-1.0.1.tar.gz
(3.2 kB
view details)
File details
Details for the file maildocker-1.0.1.tar.gz
.
File metadata
- Download URL: maildocker-1.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4d1da5ca0c5390fbdf009a6d62908c8a90b714249af25e99d59da4727d30fdfc
|
|
MD5 |
f28687bdfa461099b50f281e85d52ed0
|
|
BLAKE2b-256 |
9ffe17f88e247cfa33c4c1b0ac37c87ffa26fc8df32e40400fedb9ec4b508ce1
|