Best Practices for Email Templates best-practices-for-email-templates
- Applies to:
- Experience Manager 6.5
This article applies to the deprecated Foundation Components based AEM email components.
This document describes some of the best practices around email design resulting in a well-developed email campaign template.
The demo campaign available in AEM follows all of these best practices. How the best practices are implemented in the demo campaign is described for each best practice.
Use these best practices when creating your own newsletter.
All campaign content should be created under a master page of type cq/personalization/components/ambitpage.
For example, if your planned campaign structure is something like
/content/campaigns/teasers/en/campaign-promotion-global
Make sure it resides under a master page
/content/campaigns/teasers/master/en/campaign-promotion-global
When creating a mail template for Adobe Campaign, you must include the property acMapping with the value mapRecipient in the jcr:content node of the template. If you do not, you cannot select the Adobe Campaign template in Page Properties of Experience Manager (field is disabled).
Images images
/libs/mcm/campaign/components/image
Best Practice
Implementation
Add alt attributes to images
The alt attribute has been defined as mandatory for the image component.
Use jpg instead of png format for images
Images are always served as JPG by the image component.
Use <img> element instead of background images in a table.
No background image data is used in the templates.
Add attribute style=“display block” on pictures. Doing so lets them display well on Gmail.
All images contain per default the style=“display block” attribute.
Text and Links text-and-links
/libs/mcm/campaign/components/heading, /libs/mcm/campaign/components/textimage
Generic generic
Best Practice
Implementation
Use W3C validator to correct the HTML code. Make sure that all open tags are properly closed.
Code was validated. For XHTML transitional Doctype only, the missing xmlns attribute for the <html> element is missing.
Avoid using JavaScript or Flash - those technologies are often unsupported by email clients.
JavaScript or Flash is not used in the newsletter template.
Add a plain text version for multipart sending.
A new widget was built into the page properties to easily extract a plaintext version from the page content. You can use it as a starting point for the final plaintext version.
Campaign newsletter templates and examples campaign-newsletter-templates-and-examples
AEM comes with several templates and components out of the box for you to create campaign newsletters. You can use these templates and components to create your custom newsletters.
Templates templates
To offer a solid base and to broaden the variety of content flow possibilities, there are three slightly different template types available out-of-the-box. You can easily use these three types to build a custom newsletter.
All have a header, a footer, and a body section. Below the body section, each template differs in column design (one, two, or three columns).
Components components
There are currently seven components available for use inside campaign templates. These components are all based on the Adobe markup language HTL.
Component name
Component path
Heading
/libs/mcm/campaign/components/heading
Image
/libs/mcm/campaign/components/image
Text&Personalization
/libs/mcm/campaign/components/personalization
Textimage
/libs/mcm/campaign/components/textimage
Link
/libs/mcm/campaign/components/reference
Dynamic Media Classic (formerly Scene7) Image Template
/libs/mcm/campaign/s7image
Targeted Reference
/libs/mcm/campaign/components/reference
These components are optimized for mail content; that is, they adhere to the best practices outlined in this document. Using other out-of-the-box components usually violates these rules.
These components are described in detail in Adobe Campaign components.