mjml-react | React component library to generate the HTML emails | Email library
kandi X-RAY | mjml-react Summary
kandi X-RAY | mjml-react Summary
React component library to generate the HTML emails on the fly
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Escapes characters in a string .
- Renders a mml object
- Convert the given size to pixel size .
- Converts an element to a React Element .
- if a url is valid
- Handle converting color value to string
- Add query parameters to a URL .
- Fixes if condition with conditional content
- Converts mjml properties to JSON
- convert a named entity to a string
mjml-react Key Features
mjml-react Examples and Code Snippets
Community Discussions
Trending Discussions on mjml-react
QUESTION
Describe the bug
- The use of relative paths render broken links on the email recipient
- The use of links from images on the web generate broken links on the email, except for the case that these links have a termination which explicitly names an image, with its type (jpg, etc), e.g
src="http:://somelink....jpg"
To Reproduce
Relative path does not work:
...ANSWER
Answered 2020-Dec-21 at 07:48In the general case:
Relative addresses work on your system as you're developing your email.
Sadly, there's no way to send external files with your email. Hence, files you can find with relative addresses on your system are unlikely to be present on your recipient's system.
You'll want to put your files at Internet-reachable URLs and refer to them that way in your emails.
As you observed, that works well when you reference the entire path and filename, including the extension.
In your case:
The package you're using strives to be a way to send images with your email. Nifty. If it works, it hides lots of complexity.
I notice about that package that it hasn't been updated in two years or more. If it worked then, it'd be no surprise that it no longer works. Good luck!
Extras: Be careful with sending your email. Every email client I've heard about changes your HTML if you use cut-and-paste to put the HTML in their editor for sending. If they change your HTML, you're not sending what you thought you were sending. Bummer. The fix is to use an email service provider. Some are free for a limited number of emails sent. Pick one that doesn't change your HTML; some do!
You can test your HTML by pasting it into the free service https://putsmail.com (don't click the option to inline your CSS). They'll send the email to the email account of your choice and you can check it in the email client of your choice.
By the way, a great source of MJML support is https://slack.mjml.io/.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mjml-react
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page