Preferred_content
The <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
Both the
<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
<body>
sectionFor 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.
The <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
Use
Note:
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
Both HTML and plain text.
-
simple_text
Plain text.
-
rich_text
HTML.
Note:
If the <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.
Example:
rich_text...
Next page:
Related Pages:
- Newsletter
- Recipients section
- Delivery section
- Notes section
- Message section
- Building a campaign with XMLDelivery
Also see:
- 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