Skip to main content

E-mail with text and html content provided with markdown

Project description

Purpose

Send e-mails with generated html content.

The content has to be written in Markdown syntax. The text part of the e-mail will be filled verbatim; the html part will be a converted HTML from the Markdown content.

Basic Usage

import markdownmail

CONTENT = u"""
SPAMS AND EGGS
==============

This is a demo with a list:

1. Spam
2. Second spam
3. ...and eggs
"""

email = markdownmail.MarkdownMail(
    from_addr=(u'alice@example.com', u'Alice'),
    to_addr=(u'bob@example.com', u'Bob'),
    subject=u'MarkdownMail demo',
    content=CONTENT
)

email.send('localhost')

Content must be unicode.

Tests

Tox must be installed on the operating system before executing the tests. Execute them with:

$ tox

or

$ make check

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

markdownmail-0.3.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

markdownmail-0.3.0-py2.py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page