Simple MJML based mail template with full RTL support

The mail below is aligned to the right and the text direction is RTL

Use the visual studio code extension for MJML to generate the actual HTML from it.


<mjml>
  <mj-head>
  
    <mj-style inline="inline">
      body, .rtl { direction: rtl; text-align: right; }
    </mj-style>
  
    <mj-attributes>
      <mj-text css-class="rtl" font-family="Arial, sans-serif" font-size="16px" line-height="145%" align="right" />
    </mj-attributes>
  </mj-head>
  <mj-body background-color="#f5f5f5">
    

    <mj-section background-color="#ffffff" padding="20px">
      <mj-column>
        <mj-text>
          		לקוח יקר,<br/><br/>
		מצ"ב חשבונית...<br/>
		מודים על רכישתך.<br/><br/>
		לא ניתן להשיב למייל זה.

        </mj-text>
        <mj-button href="https://example.com/login" background-color="#007bff" color="#ffffff" align="right">
          הורד חשבונית
        </mj-button>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Post a Comment

Previous Post Next Post