goerz / markdownemail

Script to add a multipart html version to markdown-formatted plain text emails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markdownemail.py

This is a script that I use as part of a mutt sendmail script to optionally add an html version for a markdown-formatted plain text email while it is sent to SMTP.

The code is adapted from https://github.com/Roguelazer/muttdown.

To enable conversion, the plain text email should start with a line !m, !md, or !markdown.

Attachments can be referenced for inline images by name, e.g.

![attached.png](attached.png)

These get converted to proper cid links.

In principle, this works also for links, but only in very few email clients (Web Gmail is the only one I've found.)

For previewing, it is best to paste the markdown text into a Gist.

About

Script to add a multipart html version to markdown-formatted plain text emails

License:ISC License


Languages

Language:Python 100.0%