md-to-eml

Convert Markdown with YAML frontmatter into RFC 5322-compliant .eml emails.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/fabioc-aloha/tldr --skill md-to-eml
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: md-to-eml
Source: https://github.com/fabioc-aloha/tldr/tree/main/.github/skills/md-to-eml
Command: npx skills add https://github.com/fabioc-aloha/tldr --skill md-to-eml

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convert Markdown documents with YAML frontmatter into RFC 5322-compliant emails, delivering consistent formatting with inline CSS and embedded images.

Core Features & Use Cases

  • YAML frontmatter mapping to To, From, Subject, CC, and Reply-To headers.
  • Email-safe HTML with inline CSS and CID-embedded images for broad client compatibility.
  • Mermaid diagrams converted to email-safe ASCII fallbacks, and emoji preserved in subject and body.
  • Test mode to override recipients for safe previews prior to sending.

Quick Start

Run the md-to-eml script on a Markdown file to generate a ready-to-send .eml email.

Frequently Asked Questions about md-to-eml

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Markdown to an RFC 5322-compliant email?

Markdown documents with YAML frontmatter are converted to .eml emails by mapping frontmatter fields to standard headers like To, From, and Subject, while transforming the body into email-safe HTML with inline CSS.

Can I use YAML frontmatter to set email headers like CC and Reply-To?

Yes, YAML frontmatter can set email headers like CC and Reply-To. The conversion process maps frontmatter fields directly to RFC 5322 headers, including To, From, Subject, CC, and Reply-To, for accurate email distribution.

How do I embed images in Markdown emails for broad client compatibility?

To ensure broad email client compatibility, images are embedded using CID references and CSS is applied inline. This prevents external loading issues and maintains consistent formatting across different email clients.

Does Node.js support converting Mermaid diagrams in Markdown to email-safe formats?

When converting Markdown to email, Mermaid diagrams are automatically rendered as email-safe ASCII fallbacks. This process runs on Node.js 18+ to ensure proper script execution and format compatibility.

How can I safely preview a Markdown email before sending it to recipients?

Preview a Markdown email safely by using test mode, which overrides the actual recipients. This allows you to generate and review the .eml file for formatting and content accuracy without risking unintended distribution.

What is the best way to send newsletters written in Markdown?

The best way to send Markdown newsletters is converting them to .eml files using inline CSS and CID-embedded images. This ensures professional formatting and broad compatibility for governance and newsletter distribution workflows.