<preferred_content> element allows you to choose the content type for your Email message, such as HTML, plain text, or both. It is used:
If you do not use the template_from_campaign_id element
<preferred_content>element and the Body section must be used, but the
<body>section can be empty.
In combination with the Email group, with an empty
For example, you can use the
<preferred_content>element together with an Email group that contains both HTML and plain text, to send HTML content only.
<preferred_content> element is:
- A child of the Email message section
- Mandatory if you use the
<body>section, otherwise optional
- Positioned after any Headers section and any Publish_on_web section, if used, within the Message section of the XML instructions file
If you choose to use the
<template_from_campaign_id> element, the content information is populated from there. You should not include either a
<preferred_content> element, or a
<body> section in your XML instructions file.
If used, the
<preferred_content> element must have one of the following values:
Both HTML and plain text.
<preferred_content> element is set to a value that is not consistent with the content of the Email group or the
<body> section, XMLDelivery returns an error message. This would be the case, for example, if
<preferred_content> is set to
both, but the Email group or the
<body> section only includes an HTML message.
- Recipients section
- Delivery section
- Notes section
- Message section
- Building a campaign with XMLDelivery
- Filtering and added recipients
- Activating link tracking
- Disabling the automatic HTML template prettify function
- Disabling the automatic HTML-entity unescape function
- Enabling ERB evaluation when unescape is disabled
- Contactlab section
- Using XMLDelivery
- Does XMLDelivery match your needs?
- Setting up XMLDelivery
- Working examples