DynaMail - send data-driven, multi-language emails - replace Sitecore EXM

DynaMail - send data-driven, multi-language emails - replace Sitecore EXM

For a Sitecore Experience Commerce project we needed to send out emails on placed orders, but could not use EXM due to licensing issues. We solved this by adding a commerce pipeline block to send out e-mails on newly created orders but needed support for data-driven, multi-language transactional emails. I wrote a system to develop these email templates using:

  • MJML - a markup language for responsive e-mails we use in producing building blocks for EXM as well
  • Handlebars - for injecting JSON data into the emails

The system is called DynaMail. In development mode the e-mail templates can be edited in an editor like Visual Studio code, and on save can be previewed in a browser:

No alt text provided for this image

From within the preview window it is possible to send out email to an email address for quick testing in email clients:

No alt text provided for this image

You can switch the preview between the different available mail templates, and the different available languages.

When you are done with the development of the templates, Dynamail has a build mode to compile the email templates for multiple languages into the production version, so templates can be validated before deployment:

No alt text provided for this image

The compilation results in an Azure Functions package that uses a SendGrid binding to send out the emails.

The project including a lot of documentation can be found at?https://github.com/macaw-cad/DynaMail and is open-source under an MIT license (can be commercially used for free). I would love to get feedback if this is helpful for other projects as well...

Below an example of a mobile-optimized version of the above transactional email for a Sitecore Experience Commerce order:

No alt text provided for this image


要查看或添加评论,请登录

Serge van den Oever的更多文章

  • SUGCON 2024 - my three cents...

    SUGCON 2024 - my three cents...

    Jason St-Cyr from Sitecore, although unable to attend the SUGCON conference in Dublin in person, provided insightful…

    2 条评论
  • Sitecore User Group Netherlands meeting @ Macaw

    Sitecore User Group Netherlands meeting @ Macaw

    Tuesday, September 27 the Dutch Sitecore User Group (SUGNL) came together at the Dutch headquarters of Macaw in the…

    1 条评论
  • What do we know about XM Cloud?

    What do we know about XM Cloud?

    As Sitecore MVPs, we had different sessions with Sitecore the last few months to keep us up to date on what is…

  • Sitecore demo portal ain't no XM Cloud

    Sitecore demo portal ain't no XM Cloud

    After my stupid blunder of mixing up Sitecore demo portal and XM Cloud I had to rewrite some blog posts[1][2], and do…

  • Azure Fluid Relay and Fluid Framework

    Azure Fluid Relay and Fluid Framework

    Microsoft made a great managed cloud service available on Azure called Azure Fluid Relay that enables Fluid Framework…

  • Boxever - my first baby steps

    Boxever - my first baby steps

    After doing the Boxever Advanced Certification I was lucky enough to get access to a Boxever sandbox. I will post my…

    1 条评论
  • XC 10 - Tip #8: When assembly hell breaks loose - hunt & fix

    XC 10 - Tip #8: When assembly hell breaks loose - hunt & fix

    Just a few days before a big milestone, we need to deliver our Sitecore Commerce solution to a customer, Sitecore…

    1 条评论
  • XC 10 - Tip #7: When the docs fails - Google

    XC 10 - Tip #7: When the docs fails - Google

    Ok, a bit of an obvious one: if you need an answer, you Google. But if you hit a Sitecore documentation page in most…

  • XC 10 - Tip #6: When the docs fails -ILSpy

    XC 10 - Tip #6: When the docs fails -ILSpy

    The best documentation is the code. And the code you need, especially when replacing for example a pipeline block where…

  • XC 10 - Tip #5: When the docs fails -NDepend

    XC 10 - Tip #5: When the docs fails -NDepend

    With a large software product like Sitecore with a huge code-base, it is difficult to get a good overview of how…

社区洞察

其他会员也浏览了