Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

maildocker/maildocker-python

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Maildocker-Python

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)

About

Maildocker (http://maildocker.io) Python library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.