Generating the Newsletter
SunMailer generates the newsletter by first creating XML containing the contents of the newsletter. For each newsletter design, SunMailer uses an XSL file associated with that design to generate the text or HTML that subscribers see. Two XSL files come with SunMailer, one for a text design (text-default.xsl) and one for an HTML design (html-default.xsl).
Redesigning the Newsletter
To modify the existing two designs, do not modify text-default.xsl and html-default.xsl. Create a new XSL file instead, using the provided XSL files as a starting point or a guideline. Once they are ready, go to:
Administer > Site configuration > SunMailer > Configure SunMailer > Newsletter formats
If you merely plan to redesign the existing text or HTML design, simply upload the XSL file for that format and submit the form. You can revert back to the original XSL file later if necessary. Subscribers using that format will now see the redesigned format in the future.
SunMailer must always contain one default text and one default HTML section. These two formats cannot be deleted; they can only be modified. For new subscribers, the subscription form will default to either the default text or HTML format (you can select which one). The defaul text format is also used as the alternate text body should a subscriber view an HTML email with an email client that does not support HTML.
You can also add new formats as well. Each format will either be a text or an HTML format. Once you create the format, you cannot switch from text to HTML or vice-versa, to avoid springing an unexpected surprise on subscribers using that format. If you delete a format, subscribers using that format will switch to the default text or HTML format, depending on whether the deleted format was a text or an HTML format.
Tips
You should definitely examine the two existing XSL files before creating one of your own. While XSL is not hard to learn, there are a few things you should be aware of. Here are some tips:
- For a text format, use for a new line
- For an HTML format, use the disable-output-escaping attribute for <xsl:value-of> tags
- Google GMail does not support <style> tags; all your styles must be inline styles
- CampaignMonitor has a good guide to CSS support in email clients