Message Customization

This sections shows how to customize the appearance of messages when converted to HTML.


Message Header

Through the Resource File, you can control how MHonArc formats the mail message header in HTML.

Excluding Fields

The EXCS resource allows you to specify what fields should be excluded in the HTML output.

EXCS

Each line of the EXCS element specifies a mail header field to exclude in the converted HTML output. Each line is treated as a Perl regular expression (NOTE: the regular expression is already anchored to the begining of the line).

The default value for EXCS is the following:

<EXCS>
content- 
errors-to 
forward 
lines 
message-id 
mime- 
nntp- 
originator 
path 
precedence 
received 
replied 
return-path 
status 
via 
x- 
</EXCS>

Any fields you specify for the EXCS resource will augment the default list, unless the "Override" attribute is specified. If "Override" is specified, the default list is discarded along with any other lists specified from previous EXCS elements; and only header fields specified in the EXCS element are excluded.

Field Order

The FIELDORDER resource allows you to control the order the message header fields appear in the HTML output.

FIELDORDER

Each line of the FIELDORDER element is the exact case-insensitive name of a message header field. The order the fields are listed is the order they will appear in the filtered message. The special field value "-extra-" represents all fields not explicitly specified in the FIELDORDER element and not excluded by the EXCS element. Extra fields are listed in sorted order.

The following represents the default value of the FIELDORDER resource:

<FIELDORDER>
to
subject
from
date
-extra-
</FIELDORDER>

Field Formatting

The FIELDSTYLES and LABELSTYLES resources allow to control how each message header field is formatted.

FIELDSTYLES

Each line in the FIELDSTYLES element defines HTML elements to wrap around the field text in mail headers (e.g. "To: field text", "From: field text"). The format of each line is "field_name:html_element". This specifies to wrap html_element around the text associated with field_name. If html_element is empty, then the field text is not wrapped in any element.

MHonArc defines a special field_name called "-default-". This is default HTML element to wrap field text in if no explicit specific element is defined for the label.

field_name must be the exact name of a header field name, but character case is ignored.

The default value of FIELDSTYLES is the following:

<FIELDSTYLES>
-default-
</FIELDSTYLES>

LABELSTYLES

Each line in the LABELSTYLES element defines HTML elements to wrap around labels in mail headers (e.g. "To:", "From:"). The format of each line is "field_name:html_element". This specifies to wrap html_element around field_name. If html_element is empty, then the label is not wrapped in any element.

MHonArc defines a special field_name called "-default-". This is default HTML element to wrap a label in if no explicit specific element is defined for the label.

field_name must be the exact name of a header field name, but character case is ignored.

The default value of LABELSTYLES is the following:

<LABELSTYLES>
-default-:em
</LABELSTYLES>


Message Body

The only way to control how message bodies get formatted is through MIME message filters. See MIME for more information.


Other Resources

Index Links

INDEXBL

The single line value of the INDEXBL element represents the label text to use for the "Index" button link at the top of filtered messages. Any HTML markup is allowed as long as it is legal within the anchor element.

The default value of INDEXBL is "[Index]".

INDEXFL

The single line value of the INDEXFL element represents the text to use before the verbose name "Index" link in the footer of filtered messages. Normal text should be used for this element since the text will appear in an HTML LI element inside a UL. Unlike INDEXBL, the text is not wrapped in an anchor.

The default value of INDEXFL is "Index".

TINDEXBL

The single line value of the TINDEXBL element represents the label text to use for the "Thread Index" button link at the top of filtered messages. Any HTML markup is allowed as long as it is legal within the anchor element.

The default value of TINDEXBL is "[Thread]".

TINDEXFL

The single line value of the TINDEXFL element represents the text to use before the verbose name "Thread Index" link in the footer of filtered messages. Normal text should be used for this element since the text will appear in an HTML LI element inside a UL. Unlike TINDEXBL, the text is not wrapped in an anchor.

The default value of TINDEXFL is "Thread".

Message Links

NEXTBL

The single line value of the NEXTBL element represents the label text to use for the "Next" button link at the top of filtered messages. Any HTML markup is allowed as long as it is legal within the anchor element.

The default value of NEXTBL is "[Next]".

NEXTFL

The single line value of the NEXTFL element represents the text to use before the verbose subject "Next" link in the footer of filtered messages. Normal text should be used for this element since the text will appear in an HTML LI element inside a UL. Unlike NEXTBL, the text is not wrapped in an anchor.

The default value of NEXTFL is "Next".

PREVBL

The single line value of the PREVBL element represents the label text to use for the "Prev" button link at the top of filtered messages. Any HTML markup is allowed as long as it is legal within the anchor element.

The default value of PREVBL is "[Prev]".

PREVFL

The single line value of the PREVFL element represents the text to use before the verbose subject "Prev" link in the footer of filtered messages. Normal text should be used for this element since the text will appear in an HTML LI element inside a UL. Unlike PREVBL, the text is not wrapped in an anchor.

The default value of PREVFL is "Prev".

E-mail Links

MAILTOURL

URL to use for e-mail address hyperlinks. The following variables are defined for the MAILTOURL resource:

$FROM$
Who the message is from.
$MSGID$
Message ID of the message.
$SUBJECT$
The subject of the message.
$TO$
Destination e-mail address of link.
MHonArc will use the following URL by default: "mailto:$TO$"

Header and Footer

MSGHEAD

The MSGHEAD resource represents HTML text that should be inserted at the very beginning of each converted message. This resource is useful for inserting a link back to your server's home page or to a search form.

You may use the following variables which are expanded at runtime:

$CURDATE$
The current date and time.
$DOCURL$
The URL to MHonArc documentation.
$GMTDATE$
The current UTC/GMT date and time.
$IDXFNAME$
Filename of index page.
$IDXTITLE$
Title of index page.
$LOCALDATE$
The current local date and time.
$NEXTMSG$
Filename of next message.
$NUMOFMSG$
The number of messages in the archive.
$PREVMSG$
Filename of previous message.
$PROG$
Name of program.
$VERSION$
Version number of program.

MSGFOOT

The MSGFOOT resource represents HTML text that should be appended to the end of each converted message. This resource is useful for inserting a link back to your server's home page or to a search form.

The variables available for MSGHEAD may be used in MSGFOOT.


[Prev:Thread Index Customization]
[Next:MIME]
[ToC]


MHonArc 1.1.0 -- Message Customization