{"id":27767,"date":"2022-03-24T19:50:34","date_gmt":"2022-03-24T19:50:34","guid":{"rendered":"http:\/\/handle-responsive-emails-with-images-in-mjml-in-nodejs"},"modified":"2025-04-16T12:52:22","modified_gmt":"2025-04-16T19:52:22","slug":"handle-responsive-emails-with-images-in-mjml-in-nodejs","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/","title":{"rendered":"Responsive emails with Images in MJML in Nodejs"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>Electronic Mail, popularly known as email, is an electronic means of exchanging messages between people. The content of an email can be texts, images, videos, links, e.t.c, which makes it tricky when building for different screen sizes and making it responsive.<\/p>\n<p>This post will discuss building a responsive email with images using <a href=\"https:\/\/mjml.io\/\">MJML<\/a> and Node.js. At the end of this tutorial, we will learn how to configure Node.js to serve email templates, use a templating engine to pass in custom variables, and use MJML to build responsive email.<\/p>\n<p>MJML is a framework for building responsive email templates. It is responsive by default and does not require writing media queries to cater for different screen sizes. MJML uses an HTML-like semantic syntax as its building block that supports extensibility and code reuse. MJML also comes with an engine for transpiling MJML code into the desired format.<\/p>\n<h2>Sandbox<\/h2>\n<p>We completed this project in <a href=\"https:\/\/codesandbox.io\/s\/cocky-wright-1yi06g?file=\/app.js\">a CodeSan<\/a><a href=\"https:\/\/codesandbox.io\/s\/cocky-wright-1yi06g?file=\/app.js\">d<\/a><a href=\"https:\/\/codesandbox.io\/s\/cocky-wright-1yi06g?file=\/app.js\">box<\/a>, and you can fork it to run the code.<\/p>\n<\/div>\n\n\n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/cocky-wright-1yi06g?theme=dark&amp;codemirror=1&amp;highlights=&amp;editorsize=50&amp;fontsize=14&amp;expanddevtools=0&amp;hidedevtools=0&amp;eslint=0&amp;forcerefresh=0&amp;hidenavigation=0&amp;initialpath=%2F&amp;module=&amp;moduleview=0&amp;previewwindow=&amp;view=&amp;runonclick=1\"\n      height=\"500\"\n      style=\"width: 100%;\"\n      title=\"cocky-wright-1yi06g\"\n      loading=\"lazy\"\n      allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n    ><\/iframe>\n  <\/div>\n\n\n<div class=\"wp-block-cloudinary-markdown \"><p>Github link <a href=\"https:\/\/github.com\/Mr-Malomz\/mail_temp\">here<\/a>.<\/p>\n<h2>Prerequisites<\/h2>\n<p>The following steps in this post require JavaScript and Node.js experience. Experience with MJML isn\u2019t a requirement, but it\u2019s nice to have.<\/p>\n<h2>Getting Started<\/h2>\n<p>We need to create a Node.js starter project by navigating to the desired directory and running the command below in our terminal.<\/p>\n<pre><code>mkdir mail_temp &amp;&amp; cd mail_temp &amp;&amp; npm init -y\n<\/code><\/pre>\n<p>The command creates a  <code>mail_temp<\/code> directory, navigates into the directory, and creates a Node.js project with a <code>package.json<\/code> file, a JSON file for configuring and monitoring application installed dependencies.<\/p>\n<p><strong>PS<\/strong>: <code>-y<\/code> <em>flag stands for yes, and it tells<\/em> <code>npm<\/code> <em>to generate an empty project without going through an interactive process.<\/em><\/p>\n<p>We proceed to install the required dependencies with:<\/p>\n<pre><code>npm i mjml express eta\n<\/code><\/pre>\n<p><code>mjml<\/code> is a framework for creating responsive email<\/p>\n<p><code>express<\/code> is a Node.js framework for creating web and mobile applications.<\/p>\n<p><code>eta<\/code> is a JavaScript templating engine. It lets us include logic in our markup.<\/p>\n<h2>Project structuring and setup<\/h2>\n<p>It is essential to have a good folder structure for our project. It makes it easier for us and others to read our codebase.\nTo do this, we need to create  <code>src<\/code> and <code>views<\/code> folder in our project directory.<\/p>\n<p><code>src<\/code> is a folder for structuring our email template.<\/p>\n<p><code>views<\/code> is a folder for structuring application views and generated outputs from MJML.<\/p>\n<p><strong>Application Configuration<\/strong>\nNext, we need to setup up our project to transpile and run effectively on the browser. To do this, we need to modify the <code>package.jon<\/code> file as shown below:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JSON \/ JSON with Comments\" data-shcb-language-slug=\"json\"><span><code class=\"hljs language-json shcb-wrap-lines\">{\n  <span class=\"hljs-attr\">\"name\"<\/span>: <span class=\"hljs-string\">\"mail_temp\"<\/span>,\n  <span class=\"hljs-attr\">\"version\"<\/span>: <span class=\"hljs-string\">\"1.0.0\"<\/span>,\n  <span class=\"hljs-attr\">\"description\"<\/span>: <span class=\"hljs-string\">\"\"<\/span>,\n  <span class=\"hljs-attr\">\"main\"<\/span>: <span class=\"hljs-string\">\"app.js\"<\/span>,\n  <span class=\"hljs-attr\">\"type\"<\/span>: <span class=\"hljs-string\">\"module\"<\/span>, \n  <span class=\"hljs-attr\">\"scripts\"<\/span>: {\n     <span class=\"hljs-attr\">\"build\"<\/span>: <span class=\"hljs-string\">\"mjml src\/template.mjml --output views\/output.eta\"<\/span>,\n     <span class=\"hljs-attr\">\"start\"<\/span>: <span class=\"hljs-string\">\"npm run build &amp;&amp; node app.js\"<\/span>\n   },\n  <span class=\"hljs-attr\">\"keywords\"<\/span>: &#91;],\n  <span class=\"hljs-attr\">\"author\"<\/span>: <span class=\"hljs-string\">\"\"<\/span>,\n  <span class=\"hljs-attr\">\"license\"<\/span>: <span class=\"hljs-string\">\"ISC\"<\/span>,\n  <span class=\"hljs-attr\">\"dependencies\"<\/span>: {\n     <span class=\"hljs-attr\">\"eta\"<\/span>: <span class=\"hljs-string\">\"^1.12.3\"<\/span>,\n     <span class=\"hljs-attr\">\"express\"<\/span>: <span class=\"hljs-string\">\"^4.17.2\"<\/span>,\n     <span class=\"hljs-attr\">\"mjml\"<\/span>: <span class=\"hljs-string\">\"^4.12.0\"<\/span>\n    }\n  }\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JSON \/ JSON with Comments<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">json<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The snippet above does the following:<\/p>\n<ul>\n<li>\n<strong>Line 5<\/strong>: changed the application entry point to <code>app.js<\/code>. We will create this file in the next section.<\/li>\n<li>\n<strong>Line 6<\/strong>: this line is needed to enable the ES6 module and support import syntax in our files.<\/li>\n<li>\n<strong>Line 8-9<\/strong>: modified this to include our application\u2019s <code>build<\/code> and <code>start<\/code> script option.\n<ul>\n<li>The <code>build<\/code> script uses the <code>mjml<\/code> engine to transpile the <code>template.mjml<\/code> file inside the <code>src<\/code> folder output it in the <code>views<\/code> folder as <code>output.eta<\/code> file. <code>.eta<\/code> is the file extension for the <code>eta<\/code>  templating engine we installed earlier.\nWhen we start building our email template, we will create the <code>template.mjml<\/code>.<\/li>\n<li>The <code>start<\/code> script runs the <code>build<\/code> script above first and then run the application.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Creating the application entry point<\/h2>\n<p>With that done, we need to configure a Node.js server to enable us to render our email template on a browser. To do this, we need to create an <code>app.js<\/code> file in our project directory and add the snippet below:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> express <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'express'<\/span>;\n<span class=\"hljs-keyword\">import<\/span> * <span class=\"hljs-keyword\">as<\/span> Eta <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'eta'<\/span>;\n    \n<span class=\"hljs-keyword\">const<\/span> app = express();\napp.engine(<span class=\"hljs-string\">'eta'<\/span>, Eta.renderFile);\napp.set(<span class=\"hljs-string\">'view engine'<\/span>, <span class=\"hljs-string\">'eta'<\/span>);\napp.set(<span class=\"hljs-string\">'views'<\/span>, <span class=\"hljs-string\">'.\/views'<\/span>);\n<span class=\"hljs-keyword\">const<\/span> port = <span class=\"hljs-number\">3000<\/span>;\n    \napp.get(<span class=\"hljs-string\">'\/'<\/span>, (req, res) =&gt; {\n      res.render(<span class=\"hljs-string\">'output'<\/span>, { <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">'Jane Doe'<\/span>, <span class=\"hljs-attr\">link<\/span>: <span class=\"hljs-string\">'https:\/\/hackmamba.io\/'<\/span> });\n});\n    \napp.listen(port, () =&gt; {\n      <span class=\"hljs-built_in\">console<\/span>.log(<span class=\"hljs-string\">`App listening on port: <span class=\"hljs-subst\">${port}<\/span>`<\/span>);\n});\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The snippet above does the following:<\/p>\n<ul>\n<li>Import the required dependencies.<\/li>\n<li>Creates an <code>express<\/code> application instance.<\/li>\n<li>Configure the instance to use <code>eta<\/code> as the rendering engine and set the <code>views<\/code> folder as the template files\u2019 directory.<\/li>\n<li>Creates a port <code>3000<\/code> that the application will run on.<\/li>\n<li>Creates a <code>\/<\/code> route to render the <code>output<\/code> file and passed in custom variables.<\/li>\n<li>Binds and listens for connections on the specified  <code>port<\/code>.<\/li>\n<\/ul>\n<h2>Creating a responsive email template<\/h2>\n<p>We can start creating a responsive email template with the project structuring and setup..<\/p>\n<p>We will be using the following already hosted images on Cloudinary to build our email template:<\/p>\n<p><strong>Logo image<\/strong><\/p>\n<ul>\n<li>\n<a href=\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1642367682\/fire.png\">https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1642367682\/fire.png<\/a>\n<\/li>\n<\/ul>\n<p><strong>Banner image<\/strong><\/p>\n<ul>\n<li>\n<a href=\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635416910\/jed-owen-NPBnWE1o07I-unsplash.jpg\">https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635416910\/jed-owen-NPBnWE1o07I-unsplash.jpg<\/a>\n<\/li>\n<\/ul>\n<p><strong>Section images<\/strong><\/p>\n<ul>\n<li>\n<a href=\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635037458\/david-edkins-6cC7WKiwcGs-unsplash.jpg\">https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635037458\/david-edkins-6cC7WKiwcGs-unsplash.jpg<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635037453\/timothy-eberly-yuiJO6bvHi4-unsplash.jpg\">https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635037453\/timothy-eberly-yuiJO6bvHi4-unsplash.jpg<\/a>\n<\/li>\n<\/ul>\n<p>Next, we need to navigate to the <code>src<\/code> folder, and in this folder, create a <code>template.mjml<\/code> file. We will break down the creation into two main sections.<\/p>\n<p><strong>Section One (Head Section)<\/strong><\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mjml<\/span>&gt;<\/span>\n      <span class=\"hljs-comment\">&lt;!-- head section --&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-head<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-font<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"Open Sans\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"https:\/\/fonts.googleapis.com\/css2?family=Open+Sans\"<\/span> \/&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-attributes<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">font-family<\/span>=<span class=\"hljs-string\">\"Open Sans\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"16px\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"26px\"<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#637381\"<\/span> \/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-button<\/span> <span class=\"hljs-attr\">background-color<\/span>=<span class=\"hljs-string\">\"#5666F6\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"14px\"<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#ffffff\"<\/span> \n              <span class=\"hljs-attr\">font-family<\/span>=<span class=\"hljs-string\">\"Open Sans\"<\/span> <span class=\"hljs-attr\">text-transform<\/span>=<span class=\"hljs-string\">\"capitalize\"<\/span> <span class=\"hljs-attr\">height<\/span>=<span class=\"hljs-string\">\"45px\"<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"200px\"<\/span> \/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-class<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"head-text\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"48px\"<\/span> <span class=\"hljs-attr\">text-transform<\/span>=<span class=\"hljs-string\">\"capitalize\"<\/span> <span class=\"hljs-attr\">padding-bottom<\/span>=<span class=\"hljs-string\">\"30px\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"48px\"<\/span>\/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-class<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>  <span class=\"hljs-attr\">background-color<\/span>=<span class=\"hljs-string\">\"#A1A0A0\"<\/span>\/&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-attributes<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-head<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mjml<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>An MJML file starts and close with an <code>mjml<\/code> tag. The <code>mj-head<\/code> section contains all the styles needed for this file. The head section also includes the following:<\/p>\n<ul>\n<li>\n<code>mj-font<\/code> configures the font to use for the file.<\/li>\n<li>\n<code>mj-attributes<\/code> allows us to add custom attributes to the file.<\/li>\n<li>\n<code>mj-text<\/code> adds defined properties to all the text in the file.<\/li>\n<li>\n<code>mj-button<\/code> adds defined properties to all the buttons in the file.<\/li>\n<li>\n<code>mj-class<\/code> creates reusable classes<\/li>\n<\/ul>\n<p><strong>Section Two (Body Section)<\/strong>\nNext, we can include the body of our email as shown below.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mjml<\/span>&gt;<\/span>\n  <span class=\"hljs-comment\">&lt;!-- head section --&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-head<\/span>&gt;<\/span>\n    <span class=\"hljs-comment\">&lt;!-- head code goes here --&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-head<\/span>&gt;<\/span>\n\n  <span class=\"hljs-comment\">&lt;!-- body section --&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-body<\/span>&gt;<\/span>\n    <span class=\"hljs-comment\">&lt;!-- header section --&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-image<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"80px\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1642367682\/fire.png\"<\/span> \/&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-divider<\/span> <span class=\"hljs-attr\">border-color<\/span>=<span class=\"hljs-string\">\"#F45E43\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-divider<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span> \n    <span class=\"hljs-comment\">&lt;!-- Content section --&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-wrapper<\/span> <span class=\"hljs-attr\">padding-top<\/span>=<span class=\"hljs-string\">\"0\"<\/span> <span class=\"hljs-attr\">padding-bottom<\/span>=<span class=\"hljs-string\">\"0\"<\/span> <span class=\"hljs-attr\">css-class<\/span>=<span class=\"hljs-string\">\"body-section\"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span> <span class=\"hljs-attr\">background-color<\/span>=<span class=\"hljs-string\">\"#ffffff\"<\/span> <span class=\"hljs-attr\">padding-left<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> <span class=\"hljs-attr\">padding-right<\/span>=<span class=\"hljs-string\">\"15px\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"100%\"<\/span>&gt;<\/span>\n          <span class=\"hljs-comment\">&lt;!-- Intro sectiom --&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"head-text\"<\/span>&gt;<\/span>\n            welcome onboard!\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span>  <span class=\"hljs-attr\">font-weight<\/span>=<span class=\"hljs-string\">\"bold\"<\/span>&gt;<\/span>\n            Hi <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">%=<\/span> <span class=\"hljs-attr\">it.name<\/span> %&gt;<\/span>,\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-comment\">&lt;!-- banner section --&gt;<\/span>\n           <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-image<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635416910\/jed-owen-NPBnWE1o07I-unsplash.jpg\"<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"450px\"<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"banner\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> \/&gt;<\/span>\n           <span class=\"hljs-comment\">&lt;!-- content --&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span>  &gt;<\/span>\n            Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quia a assumenda nulla in quisquam optio quibusdam fugiat perspiciatis nobis, ad tempora culpa porro labore. Repudiandae accusamus obcaecati voluptatibus accusantium perspiciatis.\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span>  &gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ul<\/span>&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li<\/span> <span class=\"hljs-attr\">style<\/span>=<span class=\"hljs-string\">\"padding-bottom: 20px\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong<\/span>&gt;<\/span>Lorem ipsum dolor:<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">strong<\/span>&gt;<\/span> Sit amet consectetur adipisicing elit.<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">li<\/span>&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li<\/span> <span class=\"hljs-attr\">style<\/span>=<span class=\"hljs-string\">\"padding-bottom: 20px\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong<\/span>&gt;<\/span>Quia a assumenda nulla:<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">strong<\/span>&gt;<\/span> Repudiandae accusamus obcaecati voluptatibus accusantium perspiciatis.<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">li<\/span>&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong<\/span>&gt;<\/span>Tempora culpa porro labore:<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">strong<\/span>&gt;<\/span> In quisquam optio quibusdam fugiat perspiciatis nobis.<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">li<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">ul<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span>   <span class=\"hljs-attr\">padding-bottom<\/span>=<span class=\"hljs-string\">\"30px\"<\/span>&gt;<\/span>\n            Lorem ipsum dolor <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"text-link\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span>&gt;<\/span>sit amet consectetur<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span> adipisicing elit. Earum eaque sunt nulla in, id eveniet quae unde ad ipsam ut, harum autem porro reiciendis minus libero illo. Vero, fugiat reprehenderit.\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-button<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"&lt;%= it.link %&gt;\"<\/span>&gt;<\/span>\n            verify account\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-button<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n    <span class=\"hljs-comment\">&lt;!-- Image section --&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span> <span class=\"hljs-attr\">padding-left<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> <span class=\"hljs-attr\">padding-right<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> <span class=\"hljs-attr\">padding-top<\/span>=<span class=\"hljs-string\">\"0\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"50%\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"20px\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-image<\/span> <span class=\"hljs-attr\">border<\/span>=<span class=\"hljs-string\">\"\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635037458\/david-edkins-6cC7WKiwcGs-unsplash.jpg\"<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"section image\"<\/span> \/&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"50%\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"20px\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-image<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635037453\/timothy-eberly-yuiJO6bvHi4-unsplash.jpg\"<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"section image\"<\/span> \/&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n    <span class=\"hljs-comment\">&lt;!-- footer section --&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"100%\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"0\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> <span class=\"hljs-attr\">icon-size<\/span>=<span class=\"hljs-string\">\"30px\"<\/span> <span class=\"hljs-attr\">mode<\/span>=<span class=\"hljs-string\">\"horizontal\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"0\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social-element<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"facebook\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social-element<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social-element<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"google\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social-element<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social-element<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"twitter\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social-element<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social-element<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"linkedin\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social-element<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#445566\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"11px\"<\/span> <span class=\"hljs-attr\">font-weight<\/span>=<span class=\"hljs-string\">\"bold\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span>&gt;<\/span>\n          View this email in your browser\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#445566\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"11px\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"16px\"<\/span>&gt;<\/span>\n          You are receiving this email advertisement because you registered with Hackmamba Inc (Dubai) and agreed to receive emails from us regarding new features, events and special offers.\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#445566\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"11px\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"16px\"<\/span>&gt;<\/span>\n          <span class=\"hljs-symbol\">&amp;copy;<\/span> Hackmamba Inc., All Rights Reserved.\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span> <span class=\"hljs-attr\">padding-top<\/span>=<span class=\"hljs-string\">\"0\"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-group<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"100%\"<\/span> <span class=\"hljs-attr\">padding-right<\/span>=<span class=\"hljs-string\">\"0\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#445566\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"11px\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"16px\"<\/span> <span class=\"hljs-attr\">font-weight<\/span>=<span class=\"hljs-string\">\"bold\"<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"footer-link\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span>&gt;<\/span>Privacy<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"footer-link\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span>&gt;<\/span>Unsubscribe<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-group<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n    \n  <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-body<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mjml<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The <code>mj-body<\/code> tag contains snippets for the following:<\/p>\n<ul>\n<li>A header section with a logo and a divider. The logo includes an image using the Cloudinary asset specified above.<\/li>\n<li>A content section with an introductory section, banner section and nested content section. The content section also contains:\n<ul>\n<li>An <strong>introductory section<\/strong> that uses the <code>mj-class<\/code> to style the title and  <code>eta<\/code> syntax to render the <code>name<\/code> variable passed to the route.<\/li>\n<li>A <strong>banner section<\/strong> that used the <strong>banner image asset<\/strong> to render an image.<\/li>\n<li>A <strong>nested content section<\/strong> that contains body texts, a list and a button that uses <code>eta<\/code> syntax to pass in the <code>link<\/code> variable as the <code>src<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li>An image section that contains two images using the <a href=\"https:\/\/cloudinary.com\/products\/digital_asset_management\">Cloudinary assets<\/a>.<\/li>\n<li>Footer section that contains <code>mj-social-element<\/code> for rendering social media icons with custom class, disclaimer section, and inline links.<\/li>\n<\/ul>\n<p><strong>Complete template.mjml<\/strong><\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mjml<\/span>&gt;<\/span>\n  <span class=\"hljs-comment\">&lt;!-- head section --&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-head<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-font<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"Open Sans\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"https:\/\/fonts.googleapis.com\/css2?family=Open+Sans\"<\/span> \/&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-attributes<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">font-family<\/span>=<span class=\"hljs-string\">\"Open Sans\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"16px\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"26px\"<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#637381\"<\/span> \/&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-button<\/span> <span class=\"hljs-attr\">background-color<\/span>=<span class=\"hljs-string\">\"#5666F6\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"14px\"<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#ffffff\"<\/span> \n          <span class=\"hljs-attr\">font-family<\/span>=<span class=\"hljs-string\">\"Open Sans\"<\/span> <span class=\"hljs-attr\">text-transform<\/span>=<span class=\"hljs-string\">\"capitalize\"<\/span> <span class=\"hljs-attr\">height<\/span>=<span class=\"hljs-string\">\"45px\"<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"200px\"<\/span> \/&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-class<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"head-text\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"48px\"<\/span> <span class=\"hljs-attr\">text-transform<\/span>=<span class=\"hljs-string\">\"capitalize\"<\/span> <span class=\"hljs-attr\">padding-bottom<\/span>=<span class=\"hljs-string\">\"30px\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"48px\"<\/span>\/&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-class<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>  <span class=\"hljs-attr\">background-color<\/span>=<span class=\"hljs-string\">\"#A1A0A0\"<\/span>\/&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-attributes<\/span>&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-head<\/span>&gt;<\/span>\n\n  <span class=\"hljs-comment\">&lt;!-- body section --&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-body<\/span>&gt;<\/span>\n    <span class=\"hljs-comment\">&lt;!-- header section --&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-image<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"80px\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1642367682\/fire.png\"<\/span> \/&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-divider<\/span> <span class=\"hljs-attr\">border-color<\/span>=<span class=\"hljs-string\">\"#F45E43\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-divider<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span> \n    <span class=\"hljs-comment\">&lt;!-- Content section --&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-wrapper<\/span> <span class=\"hljs-attr\">padding-top<\/span>=<span class=\"hljs-string\">\"0\"<\/span> <span class=\"hljs-attr\">padding-bottom<\/span>=<span class=\"hljs-string\">\"0\"<\/span> <span class=\"hljs-attr\">css-class<\/span>=<span class=\"hljs-string\">\"body-section\"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span> <span class=\"hljs-attr\">background-color<\/span>=<span class=\"hljs-string\">\"#ffffff\"<\/span> <span class=\"hljs-attr\">padding-left<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> <span class=\"hljs-attr\">padding-right<\/span>=<span class=\"hljs-string\">\"15px\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"100%\"<\/span>&gt;<\/span>\n          <span class=\"hljs-comment\">&lt;!-- Intro sectiom --&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"head-text\"<\/span>&gt;<\/span>\n            welcome onboard!\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span>  <span class=\"hljs-attr\">font-weight<\/span>=<span class=\"hljs-string\">\"bold\"<\/span>&gt;<\/span>\n            Hi <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">%=<\/span> <span class=\"hljs-attr\">it.name<\/span> %&gt;<\/span>,\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-comment\">&lt;!-- banner section --&gt;<\/span>\n           <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-image<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635416910\/jed-owen-NPBnWE1o07I-unsplash.jpg\"<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"450px\"<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"banner\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> \/&gt;<\/span>\n           <span class=\"hljs-comment\">&lt;!-- content --&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span>  &gt;<\/span>\n            Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quia a assumenda nulla in quisquam optio quibusdam fugiat perspiciatis nobis, ad tempora culpa porro labore. Repudiandae accusamus obcaecati voluptatibus accusantium perspiciatis.\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span>  &gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ul<\/span>&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li<\/span> <span class=\"hljs-attr\">style<\/span>=<span class=\"hljs-string\">\"padding-bottom: 20px\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong<\/span>&gt;<\/span>Lorem ipsum dolor:<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">strong<\/span>&gt;<\/span> Sit amet consectetur adipisicing elit.<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">li<\/span>&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li<\/span> <span class=\"hljs-attr\">style<\/span>=<span class=\"hljs-string\">\"padding-bottom: 20px\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong<\/span>&gt;<\/span>Quia a assumenda nulla:<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">strong<\/span>&gt;<\/span> Repudiandae accusamus obcaecati voluptatibus accusantium perspiciatis.<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">li<\/span>&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">strong<\/span>&gt;<\/span>Tempora culpa porro labore:<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">strong<\/span>&gt;<\/span> In quisquam optio quibusdam fugiat perspiciatis nobis.<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">li<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">ul<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span>   <span class=\"hljs-attr\">padding-bottom<\/span>=<span class=\"hljs-string\">\"30px\"<\/span>&gt;<\/span>\n            Lorem ipsum dolor <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"text-link\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span>&gt;<\/span>sit amet consectetur<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span> adipisicing elit. Earum eaque sunt nulla in, id eveniet quae unde ad ipsam ut, harum autem porro reiciendis minus libero illo. Vero, fugiat reprehenderit.\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-button<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"&lt;%= it.link %&gt;\"<\/span>&gt;<\/span>\n            verify account\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-button<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n    <span class=\"hljs-comment\">&lt;!-- Image section --&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span> <span class=\"hljs-attr\">padding-left<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> <span class=\"hljs-attr\">padding-right<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> <span class=\"hljs-attr\">padding-top<\/span>=<span class=\"hljs-string\">\"0\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"50%\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"20px\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-image<\/span> <span class=\"hljs-attr\">border<\/span>=<span class=\"hljs-string\">\"\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635037458\/david-edkins-6cC7WKiwcGs-unsplash.jpg\"<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"section image\"<\/span> \/&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"50%\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"20px\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-image<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\/dtgbzmpca\/image\/upload\/v1635037453\/timothy-eberly-yuiJO6bvHi4-unsplash.jpg\"<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">\"section image\"<\/span> \/&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n    <span class=\"hljs-comment\">&lt;!-- footer section --&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"100%\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"0\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"15px\"<\/span> <span class=\"hljs-attr\">icon-size<\/span>=<span class=\"hljs-string\">\"30px\"<\/span> <span class=\"hljs-attr\">mode<\/span>=<span class=\"hljs-string\">\"horizontal\"<\/span> <span class=\"hljs-attr\">padding<\/span>=<span class=\"hljs-string\">\"0\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social-element<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"facebook\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social-element<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social-element<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"google\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social-element<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social-element<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"twitter\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social-element<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-social-element<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"linkedin\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span> <span class=\"hljs-attr\">mj-class<\/span>=<span class=\"hljs-string\">\"social-bg\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social-element<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-social<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#445566\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"11px\"<\/span> <span class=\"hljs-attr\">font-weight<\/span>=<span class=\"hljs-string\">\"bold\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span>&gt;<\/span>\n          View this email in your browser\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#445566\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"11px\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"16px\"<\/span>&gt;<\/span>\n          You are receiving this email advertisement because you registered with Hackmamba Inc (Dubai) and agreed to receive emails from us regarding new features, events and special offers.\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#445566\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"11px\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"16px\"<\/span>&gt;<\/span>\n          <span class=\"hljs-symbol\">&amp;copy;<\/span> Hackmamba Inc., All Rights Reserved.\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-section<\/span> <span class=\"hljs-attr\">padding-top<\/span>=<span class=\"hljs-string\">\"0\"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-group<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-column<\/span> <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"100%\"<\/span> <span class=\"hljs-attr\">padding-right<\/span>=<span class=\"hljs-string\">\"0\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">mj-text<\/span> <span class=\"hljs-attr\">color<\/span>=<span class=\"hljs-string\">\"#445566\"<\/span> <span class=\"hljs-attr\">font-size<\/span>=<span class=\"hljs-string\">\"11px\"<\/span> <span class=\"hljs-attr\">align<\/span>=<span class=\"hljs-string\">\"center\"<\/span> <span class=\"hljs-attr\">line-height<\/span>=<span class=\"hljs-string\">\"16px\"<\/span> <span class=\"hljs-attr\">font-weight<\/span>=<span class=\"hljs-string\">\"bold\"<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"footer-link\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span>&gt;<\/span>Privacy<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-symbol\">&amp;#xA0;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"footer-link\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"#\"<\/span>&gt;<\/span>Unsubscribe<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-text<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-column<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-group<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-section<\/span>&gt;<\/span>\n    \n  <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mj-body<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">mjml<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>With that done, we can start a development server using the command below:<\/p>\n<pre><code>npm start\n<\/code><\/pre>\n<p>We can test our template on different device sizes and see how responsive it is.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_2EE1F9A332564EC918D3193637CD662D238205640FBD782A2D74995FB45E6799_1645114166643_screencapture-localhost-3000-2022-02-17-17_08_21.png\" alt=\"Desktop view\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"1776\" height=\"2160\"\/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_2EE1F9A332564EC918D3193637CD662D238205640FBD782A2D74995FB45E6799_1645955529661_screencapture-localhost-3000-2022-02-27-10_50_02.png\" alt=\"Mobile view\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"471\" height=\"2160\"\/><\/p>\n<h1>Conclusion<\/h1>\n<p>This post discussed how to build a responsive email with images using MJML and Node.js. MJML automatically takes care of the responsiveness.<\/p>\n<p>You may find these resources helpful:<\/p>\n<ul>\n<li>\n<a href=\"https:\/\/documentation.mjml.io\/\">MJML documentation<\/a>.<\/li>\n<li>\n<a href=\"https:\/\/eta.js.org\/\">ETA templating engine.<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/expressjs.com\/\">Express.js<\/a>\n<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":27768,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,370,177,383,249,371],"class_list":["post-27767","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-image","tag-javascript","tag-nodejs","tag-responsive","tag-under-review"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Responsive emails with Images in MJML in Nodejs<\/title>\n<meta name=\"description\" content=\"This post will discuss how to create responsive emails with Images in MJML in Nodejs\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Responsive emails with Images in MJML in Nodejs\" \/>\n<meta property=\"og:description\" content=\"This post will discuss how to create responsive emails with Images in MJML in Nodejs\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-24T19:50:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-16T19:52:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37-png?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"1012\" \/>\n\t<meta property=\"og:image:height\" content=\"506\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Responsive emails with Images in MJML in Nodejs\",\"datePublished\":\"2022-03-24T19:50:34+00:00\",\"dateModified\":\"2025-04-16T19:52:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/\"},\"wordCount\":8,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37.png?_i=AA\",\"keywords\":[\"Guest Post\",\"Image\",\"Javascript\",\"Node(JS)\",\"Responsive\",\"Under Review\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/\",\"name\":\"Responsive emails with Images in MJML in Nodejs\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37.png?_i=AA\",\"datePublished\":\"2022-03-24T19:50:34+00:00\",\"dateModified\":\"2025-04-16T19:52:22+00:00\",\"description\":\"This post will discuss how to create responsive emails with Images in MJML in Nodejs\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37.png?_i=AA\",\"width\":1012,\"height\":506},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Responsive emails with Images in MJML in Nodejs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Responsive emails with Images in MJML in Nodejs","description":"This post will discuss how to create responsive emails with Images in MJML in Nodejs","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/","og_locale":"en_US","og_type":"article","og_title":"Responsive emails with Images in MJML in Nodejs","og_description":"This post will discuss how to create responsive emails with Images in MJML in Nodejs","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/","og_site_name":"Cloudinary Blog","article_published_time":"2022-03-24T19:50:34+00:00","article_modified_time":"2025-04-16T19:52:22+00:00","og_image":[{"width":1012,"height":506,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37-png?_i=AA","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/"},"author":{"name":"","@id":""},"headline":"Responsive emails with Images in MJML in Nodejs","datePublished":"2022-03-24T19:50:34+00:00","dateModified":"2025-04-16T19:52:22+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/"},"wordCount":8,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37.png?_i=AA","keywords":["Guest Post","Image","Javascript","Node(JS)","Responsive","Under Review"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/","name":"Responsive emails with Images in MJML in Nodejs","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37.png?_i=AA","datePublished":"2022-03-24T19:50:34+00:00","dateModified":"2025-04-16T19:52:22+00:00","description":"This post will discuss how to create responsive emails with Images in MJML in Nodejs","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37.png?_i=AA","width":1012,"height":506},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/handle-responsive-emails-with-images-in-mjml-in-nodejs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Responsive emails with Images in MJML in Nodejs"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681921095\/Web_Assets\/blog\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37\/b47954ffe59f5b2143b850b7e1aa78e89440fc2b-1012x506-1_27768b0c37.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=27767"}],"version-history":[{"count":2,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27767\/revisions"}],"predecessor-version":[{"id":37440,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27767\/revisions\/37440"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/27768"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=27767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=27767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=27767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}