Headers section
The <headers>
section is where you define:
- The title
- The subject
- The sender name and address
- The reply-to address
for your Email message.
Each element is used individually, if you want to change any of the default values set by:
-
The Email group, which is defined by the newsletter tag in the Common section or:
-
An existing campaign template defined by the template_from_campaign_id element in the Email message section
The <headers>
section, if used, is:
- A child of the Email message section
- Positioned after the Encoding element, if used, within the Message section of the XML instructions file. If no
<encoding>
element is used, the<headers>
section is the first entry within the<message>
section
The <headers>
section includes the following children:
Child | Type | Description | Use |
---|---|---|---|
label | element | Title of the Email message. | Use to replace the default defined by <template_from_campaign_id> |
subject | element | Subject of the Email message. | Use to replace the default defined by the Email group or <template_from_campaign_id> |
mail_from | element | Sender <name> (display name) and <address> (Email address). | Use to replace the default defined by the Email group or <template_from_campaign_id> |
reply_to | element | Reply-to Email address. | Use to replace the default defined by the Email group or <template_from_campaign_id> |
Use
The reply_to
element must be set by the Email group, by <template_from_campaign_id>
, or here, even if it is the same as the mail_from
address.
If the label
is not set, as title will bee used the value of the subject
element or its default value if subject
is not set
You should not use empty tags.
Examples:
The campaign’s title will be subject
<headers>
<subject>subject</subject>
<mail_from>
<name>John Smith</name>
<address>john.smith@domain.com</address>
</mail_from>
<reply_to><![CDATA[John Smith <jhon.smith@domain.com>]]></reply_to>
</headers>
The campaign’s title will be my campaign
<headers>
<label>my campaign</label>
<subject>subject</subject>
<mail_from>
<name>John Smith</name>
<address>john.smith@domain.com</address>
</mail_from>
<reply_to><![CDATA[John Smith <jhon.smith@domain.com>]]></reply_to>
</headers>
Inheriting header details from an existing campaign template or the Email group
If you do not use any or all of the elements in the <headers>
section, XMLDelivery applies the relevant contents from the Email group as the default settings. If, however, you use the <template_from_campaign_id>
element, the contents from the campaign template are applied as the defaults instead.
Note:
It is best practice to use a unique <label>
(or <subject>
if you don’t use the label tag), to be able to readily identify the delivery later.