Separating HTML format and plain-text format

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. Outbound E-mail lets its users send plain-text e-mail as well as HTML e-mail. To make this possible, every Page Template in Outbound E-mail must consist of two separate sections: one section that defines the plain-text version of the Page or Component, and another section that defines the HTML version. The rendered Page, then, contains information about both visualizations.

Outbound E-mail’s script extension provides delimiter tags for these sections. By enclosing a piece of template in these delimiter tags, you identify that piece of template as the plain-text version or HTML version of the template.

Note the following:

  • Do not put plain-text delimiter tags within HTML delimiter tags or vice versa.
  • Do not put more than one plain-text section or more than one HTML section into a template.
  • Outbound E-mail ignores anything entered outside of these delimiter tags.

Procedure

  1. To delimit part of a Template as plain text or HTML, access the Page Template.
  2. To indicate the start of the plain-text version of the template, insert the following code above it:
    [% WriteOut OutboundEmail.GetTextStartTag() %]

    To indicate the end of the plain-text version of the template, insert the following code below it:

    [% WriteOut OutboundEmail.GetTextEndTag() %]
  3. To indicate the start of the HTML version of the template, insert:
    [% WriteOut OutboundEmail.GetHTMLStartTag() %]

    To indicate the end of the HTML version of the template, insert:

    [% WriteOut OutboundEmail.GetHTMLEndTag() %]
  4. Save and close the Page Template.