![]() ![]() It could be that users browse your website right now, or come back later. Congratulations.īut then you start to wonder. You can open yet another bottle of champagne, you have one true new user interested in your product. So, during the signup process, you asked your user to confirm their email address. We know you are an email veteran, and the double opt-in has no more secrets for you. How to code a welcome email: Quick Introduction To use it, you’ll just need valid credentials for both MJML API and Mailjet Transactional Send API, but don’t worry if you’re a newcomer: applying for the MJML API beta and creating a Mailjet account are totally free. We’ve even created an easy-to-execute tool, written with NodeJS, to test emails under actual conditions. We're rolling out a series of tutorials, all of which will explore a very common use-case, providing numerous examples, code snippets and nice visuals. The "How to code" tutorial: what you need to know That's why we've decided to show you how to create and send awesome transactional emails, step by step. But, enough words, you’ll definitely want some action. This combo can change your life as a developer. So, let’s recap: MJML for producing responsive HTML emails without effort, plus a templating language to bring them to life with conditional blocks and variables. Our idea: one template to rule them all, just with a single API call. Mailjet's Templating LanguageĪt Mailjet, we know the value of a fully integrated templating language, which is why we created our own templating language with our Transactional Send API in mind. You could instead use nice libraries such as Handlebars, Jinja or Twig, but then you’ll still need to write or host a dedicated service to handle the templating processing. It is in this kind of situations that a templating language comes in handy.Įven if you could potentially write your own, to be able to implement a tokenizer and a grammar, you'd need to have a good knowledge in the field and might end up reinventing the wheel when you could have been focusing on your core business instead. Having a separate template for men and another one for women, or creating specific campaigns to recommend different things based on your customer's previous purchases is not viable. Transactional emails imply more and more complex business logic, and one can often struggle to try to juggle a lot of different templates, when they could just have one personalized email that adapts to several use cases. You already know that flexibility and personalization are a must-have in the email industry. If your layout looks weird somehow, try disabling the minification in the options.A templating language for your transactional emails Its title and a message inviting to contact the administrator for editors.If there’s an error the page will display: The code viewer is only shown to superusers. A shortcut is also added under “View” in the edit page to open the raw code in a new tab.Only visible to users with the page’s edit permission.Not added if the page is rendered outside of a PageView.A button is added to quickly copy the raw code of the generated newsletter.A simple (dumb?) code viewer highlights lines with errors/warnings.Cleared if the template file has been modified.Not cached if there are errors/warnings. ![]() The MJML output is cached to avoid repetitive API calls.You also have the option to convert relative URLs into absolute ones and even specify the prepended host and/or appended query parameters Features You can also bypass the cache altogether for specific roles. You can add GET variables for which you would like to have different cached outputs. In the module settings, you can choose to remove the prepended/appended files when using Markup Regions.īy default the module caches the output to avoid repetitive API calls. You will either get error/warning messages or your email properly formatted and ready-to-go.įrom there you can copy/paste the raw generated code in an external mailing service or distribute your newsletter using ProMailer. Once your credentials are validated, select the template(s) in which you’re using the MJML syntax, save and go visualize your pages to see if everything’s good. Prerequisiteįor this module to work you will need to get an API key and paste it in the module’s configuration. Write your template using MJML combined with Processwire’s API and this module will automatically convert your code into a working newsletter thanks to their free-to-use Rest API. A module allowing you to write your Processwire template using MJML and get a converted HTML output using MJML API.Ĭreated by Mailjet, MJML is a markup language making it a breeze to create newsletters displayed consistently across all email clients.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |