.MJML File Extension
Mailjet Markup Language File
Developer | Mailjet |
Popularity |
3.3 | 3 Votes |
What is an MJML file?
An MJML file is a responsive email template or element formatted using the Mailjet Markup Language (MJML). It contains plain text that determines the template or element's contents and formatting, defined using MJML tags and syntax. Most often, developers create and edit MJML files with the official MJML app.
More Information
MJML is a markup language that web developers can use to create responsive emails and templates. It features HTML-like syntax and elements, as well as a standard component library that developers can draw from to reduce the time they spend coding responsive email elements.
Often, developers save the emails, templates, and elements they've created using MJML as MJML files. For example, when a developer creates a new project in the MJML app, MJML saves that project's base content in a file named index.mjml. If a developer creates a new project that contains a header and footer, MJML saves the project's header and footer elements in files named header.mjml and footer.mjml. (In this case, the developer's index.mjml file will contain references to their header.mjml and footer.mjml files.)
While developers most often create MJML files from within the MJML app, they can use any text editor to create MJML files. Mailjet maintains plug-ins for Microsoft Visual Studio Code, Github Atom, and Sublime Text, to make it easier for developers to create MJML files in those apps.
Common MJML Filenames
index.html - Defines the main contents of an MJML email.
header.html - Defines an MJML email header.
footer.html - Defines an MJML email footer.
How to open an MJML file
It is best to open MJML files with Mailjet's official MJML application. MJML not only highlights an MJML file's syntax, but also:
- Displays a live preview of the email or element an MJML file describes
- Allows developers to export MJML files as .HTML files
However, you can open MJML files with any text editor. Plug-ins for Microsoft Visual Studio Code, Github Atom, and Sublime Text allow those programs to highlight MJML syntax correctly.
How to convert an MJML file
You can use the MJML app to convert the email template or element an MJML file describes to the .HTML (Hypertext Markup Language) format. To do so:
- Open your MJML file with MJML.
- Select the dropdown arrow that appears next to Copy HTML.
- Select Export to HTML file.
- Name and save your HTML file.