Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mailjet-to-brevo

A command-line tool to convert Mailjet email templates to Brevo format. This utility converts MJML templates with Mailjet syntax to HTML with Brevo syntax.

Features

  • Converts MJML templates to HTML
  • Automatically transforms Mailjet variable syntax to Brevo syntax
  • Extracts template variables for preview purposes
  • Generates preview data for both Mailjet and Brevo formats
  • Identifies unconvertible patterns

Usage

Basic Usage

Convert an MJML file to HTML:

npx mailjet-to-brevo convert path/to/template.mjml

Specify Output Path

npx mailjet-to-brevo convert path/to/template.mjml path/to/output.html

Options

  • --strict: Use strict validation (fails on unconvertible patterns)
  • --save-preview: Save template variable preview data as JSON
npx mailjet-to-brevo convert path/to/template.mjml --save-preview

Syntax Conversion

This tool automatically converts Mailjet template syntax to Brevo syntax:

Mailjet Brevo
{{var:VARNAME:"default"}} {{params.VARNAME|default:"default"}}
{{variable}} {{params.variable}}
{% if var:variable == "value" %} {% if params.variable == "value" %}
{% elseif condition %} {% elif condition %}
{% for item in var:items %} {% for item in params.items %}

License

ISC

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages