58 comments

[ 2.4 ms ] story [ 69.5 ms ] thread
"Write markdown. Ship emails." - I see a particular group of people interested in this, but they have their tools already.
This appears to be a MJML wrapper with a Markdown→HTML converter attached to it. I think generating HTML from code is easier than generating Markdown, since there are many templating tools that understand HTML escaping. And writing HTML is not that hard, especially for your typical emails, so I'm not really sure if this library would be helpful in the long run.
Writing HTML for emails is a lot harder than you're making it sound. But MJML does a good job of simplifying it for most use cases.
I wish people just sent plain text.
I used to think this, but lately I'm getting a lot of plain text marketing emails that are clearly LLMs. Now I dislike plain text emails just as much as HTML ones.
templates are cool but seems too heavy to land in primary inbox
What do you mean by "too heavy"? File size?
I like how you aren't hiding the fact this is MJML under the hood and don't layer complex abstractions over MJML spec like similar projects (cough react email cough).

The devs maintaining MJML deserve so much credit for dealing with Gmail/Outlook's monopoly bullshit and 2007 html.

Nice idea for those who manage content in markdown. I've moved away from putting emails in my codebase, but seems great for founders moving fast.

What’s your opinion on react email?
Any "HTML emails" get filtered straight into the spam folder here. I think I'm not part of the target audience here.
Is that a thing? Is it safer to use plain text emails?
How do you deal with things like "we sent you a one-time code to confirm your login"? Most of those are HTML-formatted today
Markdown is the secret winner of the AI early years.
I'm not so sure. It's definitely the de facto standard, but I suspect minimal HTML is better. Just enough tags to add structure and meaning (H1-H6, p, a, em, section for structure including nesting, maybe more). LLMs were trained on a lot of HTML, they're good at processing it. HTML requires more tokens than markdown but I believe it's worth it. I'll find out in a few weeks as I experiment with both.
I hope .md domains do not become a security hole as Markdown raises in popularity...
(comment deleted)
Great project! And if you don't mind a little workaround and some Python scripting, you can turn a regular Obsidian folder into an automatic outbox. Write markdown, drag, drop, and ship.
Anything that makes email development easier is great I guess, but have personally found MJML great for solving the issues you'd run into, and not sure I want yet another abstraction layer on top of that which makes it more limited...
They address this in the docs - it is meant to make authoring the content easier for LLMs since that is easy for them to write.

It still uses MJML for the actual templates, but it is a translation layer between markdown and the template itself.

If you need to author a lot of emails with LLM this does seem like it would be a great fit.

(comment deleted)
Curious why the CLI function is `mvd` instead of `mdv`?
Love everything to Markdownify :) I was just wondering, is there a Neovim/Markdown email client? Potentially using something like this? I love Neomutt, or Newsboat, and other TUIs. It would be great to have something totally on Markdown. Update: I gave it a spin [1] with Go and some of my favorite CLI's.

[1] https://x.com/sspaeti/status/2036539855182627169

Nice usage of admonitions. This is a great example of how eloquent markdown can be. Still very readable while even including the markup for 'footer' and the call out code.
Which email client will stylize raw markdown itself, making the HTML step here superfluous?
Emacs ofc :) seriously it should not be too much work although org-mode syntax would be even easier, there is a markdown mode here: https://jblevins.org/projects/markdown-mode/ The email part is not something i have done myself but it has been a feature for a very long time and you can find plenty of guides online.
At this point markdown is going to be the foundation of the entire AI web. Someone the other day showed off Markdown as a responsive frontend protocol. Now we've got email. How long until we're writing classes in markdown? We can only abstract this so far before we confuse AI more than help it.
Very nice. I think the kind of folks attracted to this thread might have some thoughts on a workflow I'm interested in.

When I see a news article, I want to be able to click a button on my Mac or iPhone to send the text of the article in the body of the email. Bonus points for rehosting the images from the article. And using a similar font both without carrying over any of the original external dependencies.

Normally it’s good to support the journalist but I cannot in good conscience send a link to elderly folks when this is so much safer.

Use the browser reader mode, select all, right click send email. Is it something like that you want?
Would love to use this - any plans for Cloudflare Workers support? Some of the node APIs you're using block it from working on Cloudflare right now.
Good idea. I'll look into this.
Added support for cloudflare workers in 0.1.2. Thanks for the tip!
This plus a block-based editor like editorjs would be a great addition to any custom cms.
Does anyone use MJML in golang? What package are you using?