-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Send HTML content in email #1589
Conversation
As a chronic user of text email (instead of HTML), it is nice when automated emails like this get sent as both Alternatively, the Lexicon endpoint could have text and html fields to pass-through from client. Or, have a All the above are ideas and could be done later; I wouldn't block merging this sniffing PR as-is. |
There is also a plugin for nodemailer, used on the server, that automatically generates the plaintext version of an email given an html email. I pretty much always use it when I'm using nodemailer! One option is to always treat emails as html (e.g. representing linebreaks with Relatedly, if we take the approach here, will the HTML content being sent-up represent linebreaks properly? For example, this content represented in HTML may not look right to users due to how whitespace gets collapsed:
Another option is to assume all email contents are markdown, and send an HTML version compiled from markdown with that plugin 👆 generating a plaintext version. That might be a convenient way to author marked-up email contents without needing to scatter |
Ohp, just saw the PR to author emails in markdown on the client! In which case yeah, I think the move might be to:
|
@devinivy ok so I think treating all incoming content as html is the easiest option and I am not seeing a case where we would need to explicitly send plaintext content so adding |
@devinivy can I get one more look at this please? thanks! |
* ✨ Send HTML content in email * ✨ Use html-to-text plugin for moderation mailer transport * type fix --------- Co-authored-by: Devin Ivy <[email protected]>
Using a very simple regex, check if the email content contains any html tags in it and send it as html, otherwise, fallback to plain-text content