Create Responsive Emails with MJML Framework


MJML is a framing language designed to make it easy to create responsive email templates. Its semantic syntax makes the code much easier and understandable, it is also component-based and has a library of common components for emails, which helps speed up development.

The abstraction that MJML offers allows you to always be up to date with the standards and best practices of the industry, since it is constantly updated based on changes in the specifications of the mail clients, and this guarantees that it will always generate valid HTML code and optimized.

Installation

MJML is written in NodeJS so to install it you only need to run the following command line in your terminal.

npm i -g mjml

This will allow you to run MJML from any location.

Create template

Once you have created your template with MJML you only need to run this command to convert it to a valid HMTL template.

mjml -r template.mjml

You can also specify a different name for the resulting template.

mjml -r template.mjml -o mail.html

If you don't want to be typing the command every time you make a change to see the result, MJML also allows you to observe and render each change.

mjml -w template.mjml

Basic example

The following code is a basic example of a template with MJML code.
Visit the documentation for more information.

 	
 		 
			
 		
 	
 	
 		
 			
 			Easy and Quick Responsive Discover
        
 	
  
Previous You can now 'react' in different ways on Facebook
Next Google Chrome: Save passwords automatically

No Comment

Leave a reply

Your email address will not be published.