Mark Overmeer > HTML-FromMail-0.11 > HTML::FromMail::Field



Annotate this POD


Open  0
View/Report Bugs
Module Version: 0.11   Source  


HTML::FromMail::Field - output a header field as HTML


   is a HTML::FromMail::Page
   is a HTML::FromMail::Object
   is a Mail::Reporter




$obj->addressField(FIELD, HOW, ARGS)

Produce text for a header field containing addresses. HOW this is done is defining the result. Possible values are 'ADDRESS', 'PHRASE', 'PLAIN', 'MAILTO', or 'LINK'. See "address HOW" for details.

$obj->fromHead(HEAD, NAME, ARGS)

Returns the fields from the header with NAME. Some fields appear more than once, some may not be present.

$obj->htmlAddresses(FIELD, ARGS)

Returns an array with address info.


Produce the body of the field: everything after the first colon on the header line.

 Option --Default
 address  'MAILTO'
 content  <depends>
 wrap     78


See "address HOW"


How to included the body of the field. If a wrap is defined, then REFOLD is taken as default, otherwise DECODED is the default. See "content HOW"

. wrap => INTEGER

In combination with content REFOLD, it specifies the maximum number of characters requested per line. See "wrap INTEGER".


Returns the name of the header field.

 Option  --Default
 capitals  'UNCHANGED'

. capitals => 'UNCHANGED'|'WELLFORMED'

Overrules the default from new(settings) names. See "names HOW".

$obj->lookup(LABEL, ARGS)

See "METHODS" in HTML::FromMail::Page


 Option  --Defined in     --Default
 settings  HTML::FromMail::Object  {}
 topic     HTML::FromMail::Object  'field'

. settings => HASH-OF-HASHES

. topic => STRING



See "Attributes" in HTML::FromMail::Object


See "Attributes" in HTML::FromMail::Object


Other methods


See "Other methods" in HTML::FromMail::Object



You can specify the following settings in HTML::FromMail::new(settings) for topic field:

address HOW

Some fields are pre-defined to contain e-mail addresses. In many web-based clients, you see that these addresses are bluntly linked to, but you here have a choice. As example, the header field contains the address "My Name" <>

The possible settings for this parameter are

content HOW

Defined HOW field bodies are handled, by default UNFOLDED. Valid values are


Included the content FOLDED as found in the source message. This is the fastest choice, and usually in a preformatted html block, otherwise the folding will be lost again.


Do not accept the folding as found in the message headers, but force it into the wrap which is defined by wrap.


All line folding is removed from the field. This useful when the field body is displayed in a proportional font.


Fields may be character-set encoded. Decoding these fields is nicest, but consumes considerable time.

names HOW

Defines HOW field names are displayed: either 'WELLFORMED' or 'UNCHANGED'. Field names have a certain capitization (as defined by the message), but this may be different from the preferred use of capitals. The correct use of capitals is implemented by Mail::Message::Field subroutine wellformedName and will be used when WELLFORMED is selected. By default, the names are displayed UNCHANGED.

Example: using HTML::FromMail::Format::Magic

  <!--{name capitals => WELLFORMED}-->


Used in combination with content REFOLD, to specify how many characters are requested per line.


This module is part of HTML-FromMail distribution version 0.11, built on June 08, 2007. Website:


Copyrights 2003,2004,2007 by Mark Overmeer. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See

syntax highlighting: