Email body Section
The <body>
section is where you insert the HTML and/or text containers for the main content of the Email message, according to what you have selected in the Preferred_content element. It is used if:
- You do not want to use the defaults of the Email group defined by the Newsletter tag in Common sections and elementsand:
- You do not use the template_from_campaign_id element
The <body>
section is:
- A child of the Email message section
- Only used together with the
<preferred_content>
element - Positioned after the
<preferred_content>
element, within the Message section of the XML instructions file
The <body>
section includes the following children:
Child | Type | Description | Use |
---|---|---|---|
html | element | Container for the HTML content of the Email. Requires rich_text or both to be defined in the <preferred_content> element. | Use <html> and/or <text> |
text | element | Container for the plain text content of the Email. Requires simple_text or both to be defined in the <preferred_content> element. | Use <html> and/or <text> |
Use
Note:
If you choose to use the template_from_campaign_id element, the body details are populated from there. You should not include a <body>
section or a <preferred_content>
element in your instructions file.
Ensure that the content of the <body>
section matches the content type in the <preferred_content>
element. For example, if the <preferred_content>
element is set to simple_text
, the body section can only include the <text>
child. Otherwise, XMLDelivery returns an error message.
Example:
<preferred_content>both</preferred_content>
<body>
<html>
See the HTML and text section topic.
</html>
<text>
See the HTML and text section topic.
</text>
</body>