author avatar

ashwanikumarjha

Fri Sep 29 2023

When sending an email, a short snippet which is taken from the first few lines of our email content is shown right next to the email subject. This is called the preview text and can be a powerful tool for increasing the open rate.

However, the first few lines of our email might not always provide an accurate summary of what our email is about and this become important when working with HTML email template where first few lines might include elements like image alt text or navigational links.

To solve this problem, MJML have the mj-preview tag. This tag allows us to customize the preview text that appears in the recipient's inbox.

<mjml>
  <mj-head>
    <mj-preview>Check out our latest deals!</mj-preview>
  </mj-head>
  <mj-body>
    <!-- email content -->
  </mj-body>
</mjml>