Renders EEx to MJML and MJML to HTML (eex -> mjml -> html)
If available in Hex, the package can be installed
by adding mjmleex
to your list of dependencies in mix.exs
:
def deps do
[
{:mjmleex, "~> 0.1.0"}
]
end
- Install the MJML globally:
npm install -g mjml
- Create template with *.mjml.eex extension
- Render the template:
Mjmleex.render(PageView, "mail.mjml", %{name: 'John Smith'})
- Send recived html via email
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/mjmleex.