Convert Markdown files to rich HTML and copy to clipboard — ready to paste into Outlook or Gmail.
Email clients expect rich text, not raw Markdown. mdtomail converts your .md files and writes the result to the Windows clipboard in CF_HTML format, so Ctrl+V in any email composer pastes rendered HTML with proper headings, bold, tables, and code blocks.
- Windows 10/11
- Python 3.9+
git clone https://github.com/YOUR_USERNAME/mdtomail.git
cd mdtomail
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txtOptional — call from anywhere: Add the mdtomail folder to your Windows PATH
(System Properties → Environment Variables → Path → Edit → New).
mdtomail.bat notes.md
mdtomail.bat doc1.md doc2.md
mdtomail.bat report.md --no-style| Argument | Description |
|---|---|
FILE.md [FILE.md ...] |
One or more Markdown files to convert |
--no-style |
Skip inline CSS — outputs raw converted HTML |
Multiple files are joined with a horizontal rule (<hr>) in the output.
- Converts Markdown to HTML using Python-Markdown (
extra,nl2br,sane_listsextensions) - Injects inline
style=""attributes on all tags — required because Outlook strips<style>blocks - Writes the result to the Windows clipboard using the CF_HTML clipboard format via
pywin32
| Package | Purpose |
|---|---|
markdown |
Markdown → HTML conversion |
pywin32 |
Windows clipboard API (CF_HTML format) |