The body of this tag provides the content to the email or any of its parts.

Leading and trailing whitespace on the content is trimmed.

Allowed within <email:email> or <email:bodypart> tags.

The content type depends on the value provided to the type attribute, and defaults to either text/html or application/xhtml+xml, depending on the current serialization. The content is checked for well-formedness based on its type:

  • javascript, application/javascript, or text/javascript - no validation
  • json or application/json - no validation
  • ld_json or application/ld+json - no validation
  • text or text/plain - no validation
  • url or text/url - must be a valid URL
  • xhtml or application/xhtml+xml - must be well-formed XHTML content. (Note: Currently only checks character values.)
  • xhtml_attribute or application/xhtml+xml+attribute - must be a valid XHTML attribute.
  • mysql or text/x+mysql - must be valid for the MySQL command line "mysql"
  • psql or text/x+psql - must be valid for the PostgreSQL command line "psql"
  • sh or text/x+sh - must be valid shell script

Tag Information

Tag Class: com.newmediaworks.taglib.email.ContentTag
TagExtraInfo Class: None
Body Content: scriptless
Display Name: None


Name Required Evaluation Type Description
type No Runtime String

Specifies the type of content as either short form for a recognized media type or the full MIME type.

Defaults to the content type of the current serialization, which in-turn, defaults to "text/html".

serialization No Runtime String

When SGML (the default), sets the content-type to text/html. When XML, sets the content-type to application/xhtml+xml.

doctype No Runtime String

The <!DOCTYPE> to use, must be one of default, HTML5, STRICT, TRANSITIONAL, FRAMESET, or NONE.

Defaults to default, which is currently HTML5.

Note: The doctype is not written by this tag, however this setting affects the output of nested context-aware tags. To write the doctype, see <ao:html>


No Variables Defined.