Separating HTML format and plain-text format
Outbound E-mail lets its users send plain-text e-mail as well as HTML e-mail.
About this task
Some e-mail recipients do not have access to an e-mail client that can handle HTML-formatted e-mail, and prefer to receive plain-text e-mail. This format preference is stored in a Contact’s Details.
Although you can use the Generate Plain Text E-mail Template Building Block to generate a plain-text e-mail from your entire HTML output (using XSLT), it is recommended to create separate Dreamweaver Templates to handle text versions and HTML versions of your e-mail.
To cater for text and HTML versions of Component Template output:
- In your Compound Page Template, use the
SetEmailType()method in your Dreamweaver Template to get text/HTML versions of the e-mail. - In your Compound Component Template, add separate Dreamweaver Templates to render the text/HTML versions of the Component Presentations and the Set Output Item By Email Mode Template Building Block to add these versions as output elements.
- Compound Page Template
- Your Compound Page Template should contain:
- Compound Component Template
-
Your Compound Component Template should contain:
- A Dreamweaver Template to render the HTML version of your Component Presentation (e-mail text).
- A Dreamweaver Template to render the Text version of your Component Presentation (e-mail text).
- The Set Output Item By Email Mode Template Building Block adds an HTML or Text version of the Component Presentation as output elements depending on whether the Dreamweaver
SetEmailType()is set tohtmlortext.