![]() There are several ways where you can choose from depending on your environment and preferences: MJML to HTMLĪs no e-mail client can parse MJML directly, you have to generate the HTML code before sending the e-mails to the recipients. Some e-mail clients like Outlook doesn’t use width styles for images and for those, you should add a “width” attribute to the “img” tag directly. Note: Within the “” tags, you are totally on your own! No MJML tags are parsed within the table and you have to care about the responsiveness of images yourself for example. This is especially useful for the Gmail App, which discards “” tags in e-mails depdending on the account type. The “” can contain two tags often used: “” to use a specific font and “” for CSS styles that will be part of the e-mail. If “” contains the “inline” attribute, the styles will be copied to the style attributes of the HTML tags directly instead of referencing them from the head section. Note: You can’t add any additional tags between the “” and “” tags! Furthermore, most of the MJML tags are only allowed within the “” tags. ![]() This would create a responsive grid with three columns: Building a reponsive grid with MJML is rather simple: You need the “” and “” tags and and create any number of columns simply by using “” multiple times. This corresponds to the standard HTML structure. The custom tags will get translated into HTML and inline CSS while generating the output. MJML has a simple XML-based syntax and uses its own tags for describing the content. The ease of use and the choice of the build chain were the crucial factors for using MJML in Aimeos. Using Foundation, you have to wrangle with several libraries and build tools at the same time while with MJML, you can generate the output with a tool of your choice (NPM, Visual Studio Code plugin or even using a web service). The biggest difference between both is that Foundation is more complex than MJML. Because it’s hard to write the code that is most compatible by hand, there are two frameworks that makes life easier: MJML and Foundation for Emails. Both offer a simple syntax and generate the HTML/CSS code for you. Thus, the only way to get e-mails that look similar (not equal) in most clients is using tables and a limited set of inline CSS. Outlook falls into the later category and it seems that Microsoft wants to punish us forever! But often, simple features aren’t implemented since more than ten years or are buggy and therefore unusable. Most of the time, support is limited for security reasons which is a good thing because compared to web sites you have to visit actively, everyone can send you e-mails. Nevertheless, even nowadays, creating appealing e-mails for different devices is hard stuff! Software seem to be from year 2000 when comparing support for HTML5 and CSS in e-mail clients. They are still the best option to confirm the order and tell customers about changes in the delivery and payment status. Every online shop needs to send e-mails and so the Aimeos e-commerce framework does.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |