[PREVIOUS CHAPTER]
[NEXT CHAPTER]
5 Customize Fields of the Mail Header
5.1 Enforce the content for a header field
SYNOPSIS:
&DEFINE_FIELD_FORCED('field', "field-contents");
Enforces the value of "field" to "field-contents". where the field is
one of fields defined in @HdrFieldsOrder. This function sets up
$Envelope{'fh:field:'} = "field-contents";
Example: set "X-ML-Info: ML Information"
&DEFINE_FIELD_FORCED('x-ml-info', "ML Information");
5.2 Enforce the value of a field to one of the in-coming mail header
SYNOPSIS:
&DEFINE_FIELD_ORIGINAL('field');
enforce the value of a field to one of the in-coming mail header. The
field must be one of elements of @HdrFieldsOrder. This function sets
up
$Envelope{'oh:field:'};
Example: Let the value of To:, Cc:, Reply-To: be original.
&DEFINE_FIELD_ORIGINAL('to');
&DEFINE_FIELD_ORIGINAL('cc');
&DEFINE_FIELD_ORIGINAL('reply-to');
5.3 Add or Remove @HdrFieldsOrder entries
To add or remove header fields, set up @HdrFieldsOrder in config.ph.
Also FML provides macros, &ADD_FIELD, &DELETE_FIELD, for them. To add
a field "X-Uja" in the last of @HdrFieldsOrder,
&ADD_FIELD('X-Uja');
If you always remove 'Cc:' field in distribution mail, you can set it
up by
&DELETE_FIELD('Cc');
unshift(@HdrFieldsOrder, 'X-Some-Thing');
5.4 COPY_FIELD
where the field is one of fields defined in @HdrFieldsOrder.
©_FIELD(field, new-field);
Example:
©_FIELD('Sender', 'X-Sender');
[PREVIOUS CHAPTER]
[NEXT CHAPTER]