Send markdown files as electronic mail. Maintain mailing lists as templated text files.
- Durable: mail queues are fault tolerant and atomic, brokered by <www.watermill.io> over SQLite3. Can handle any volume of mail without degredation.
- Portable: runs on many kinds of systems. Will include an embeddable HTTP service and Posgres support in the future.
- Flexible: select the mailer backend based on highest deliverability. Swap it out later without changing anything in your letters or templates.
- Supports recipient list formats:
CSV,JSON,YAML,TOML, andCue. - Supports mailing services:
- SMTP (SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD)
- Mailgun (MG_API_KEY, MG_API_DOMAIN) or SMTP relay
- Resend via SMTP relay or (RESEND_API_KEY)
- Amazon SES (requires AWS configuration present, beta)
- SparkPost (alpha)
- Loops
- Cloudflare send
- Supports additional mailing services by SMTP relay:
- SMTP2GO
- Brevo
- Mailchimp
- Twilio
- SparkPost
- Postmark
- SendGrid
- ZeptoMail
- SendPulse
- MailTrap
- MailJet
- EmailLabs
- PurelyMail
- HubSpot? (smtp.hubapi.com)
- Supports recipient list formats:
SMTP relay is often more robust than the provider API. For example, Resend API does not support multi-value headers, but its SMTP relay does.
Compose a letter as a Markdown file. It must include the subject, the sender, and at least one recipient in the frontmatter:
---
subject: "Test Email"
from: "Sender <test@gmail.com>"
to: "Recipient <test@gmail.com>"
---
# Title of the Example Letter
Write text in **Markdown** notation.Provide server credentials and point mdsend at the saved file.
export SMTP_HOST=...
export SMTP_PORT=...
export SMTP_USERNAME=...
export SMTP_PASSWORD=...
mdsend letter.mdMore usage examples are here:
- MacOS:
brew tap dkotik/tap brew install curl mdsend
- Debian Package: latest release
- Linux Binary: latest release
- Windows Binary: latest release
- Build from source:
go install github.com/dkotik/mdsend/cmd/mdsend@latest
Mdsend is under active development. Version 1.0.0 is expected by the end of 2026.
This is the list of planned features. ↩
- service package with HTTP unsubscribe endpoint package
- Queue clean up scanner - should be first added to sqlite Watermill driver.
- Sending message with scheduling delay (instead of only queuing) should prompt a confirmation.
- list out templating functions in the example, including the default ones
- Write a better Goldmark 2.0 renderer that recognizes single-line youtube and image paragraphs, centers them.
- Lots of disk usage: each message is pre-rendered plaintext + html and all of that gets duplicated into watermill - i can probably pull out of the main table, but felt like extra read calls; if i add caching can trim that down
- Beautify the default template. Add
dark.htmlone. - Event invitations markup: https://developers.google.com/gmail/markup/reference/event-reservation#basic_event_reminder_without_a_ticket
- https://github.com/charmbracelet/glamour
- Run some tests with https://www.suped.com/tools/email-tester
- modularize the proprietory mailers - they should not be in default dependencies
- add to https://github.com/rothgar/awesome-tuis and bubbletea list of apps
- https://www.caniemail.com/ - check what is template-appropriate
- E-mail message validators:
- Address verification:
- Hosting:
- Beautiful templates: