Email message section
The Email message section includes all of the components of an Email message. The children of the Email section are included in the XML instructions file, if the generic campaign type is set to <email>
in the Campaign section.
The Email section children are:
- Positioned within the
<message>
section of the XML instructions file
The Email section includes the following children:
Child | Type | Description | Use |
---|---|---|---|
encoding | element | Email text encoding. | Ignored when using <template_from_campaign_id> |
headers | element | Email headers. | Use to define the message subject and sender. The Email group or <template_from_campaign_id> defaults are overridden |
publish_on_web | element | Publishes static content to the Contactlab public repository. | No default. Optional |
preferred_content | element | Defines the content as rich_text (html), simple_text (plain text) or both. | Mandatory if <body> is used, otherwise optional |
body | element | Defines the Email body. | Use <preferred_content> and <body> , or <template_from_campaign_id> to replace the Email group defaults |
template_from_campaign_id | element | Defines the identifier of an existing campaign template. | Use instead of <preferred_content> and <body> to define the Email content. Email group defaults are overridden |
Email section default values
XMLDelivery takes the default values for most of the Email message section children from:
- The Email group defined by the Newsletter tag in the Common sectionor:
- The existing campaign template defined by the
<template_from_campaign_id>
element
The exception is the <publish_on_web>
section, if used, which cannot be taken from the Email group or an existing campaign template, and must be defined in the XML instructions file.
Default values from the Email group
If the <template_from_campaign_id>
element is not used, any default values are set by the Email group defined by the Newsletter tag in the Common section.
You should use the Email message section children if you want to change any of the Email group default values. Do not include empty tags.
Default values from an existing campaign
If an existing campaign template is defined using the <template_from_campaign_id>
element, the values for the following sections and elements are taken from the template, not the Email group:
- EncodingAny
<encoding>
element in the<message>
section of the XML instructions file is ignored. - The default values for the
<headers>
sectionUse the<headers>
section if you want to change the default values defined by the template. - The values for the
<preferred_content>
element and the<body>
sectionYou can choose to use the<template_from_campaign_id>
element or<preferred_content>
and<body>
. You cannot not use<preferred_content>
and<body>
, together with<template_from_campaign_id>
for the same delivery.
Note:
It is best practice to use a unique <subject>
, to be able to readily identify the delivery later.
Example:
<message>
<encoding>utf-8</encoding>
See the Encoding topic.
<headers>
See the Headers section topic.
</headers>
<publish_on_web ovveridetaf=“true“>
See the Publish on Web section topic.
</publish_on_web>
<!– Either preferred_content AND body –>
<preferred_content>both</preferred_content>
See the Preferred_content topic.
<body>
See the Body section topic.
</body>
<!– Or template_from_campaign_id –>
See the Template from campaign ID topic.
<template_from_campaign_id>1</template_from_campaign_id>
</message>
See Email delivery working example for more about creating an XML instructions file for an email delivery.