OVERLOADED

overload: ""
See "" in Mail::Message::Head.
overload: bool
See bool in Mail::Message::Head.

METHODS

See METHODS in Mail::Reporter

Constructors

$obj->build( [PAIR|FIELD]-LIST )
See build in Mail::Message::Head::Complete.
$obj->clone( [NAMES|ARRAY-OF-NAMES|REGEXS] )
See clone in Mail::Message::Head::Complete.
$class->new( OPTIONS )
See new in Mail::Message::Head.

The header

$obj->isDelayed
See isDelayed in Mail::Message::Head.
$obj->isEmpty
See isEmpty in Mail::Message::Head.
$obj->isModified
See isModified in Mail::Message::Head.
$obj->knownNames
See knownNames in Mail::Message::Head.
$obj->message( [MESSAGE] )
See message in Mail::Message::Head.
$obj->modified( [BOOLEAN] )
See modified in Mail::Message::Head.
$obj->nrLines
See nrLines in Mail::Message::Head::Complete.
$obj->orderedFields
See orderedFields in Mail::Message::Head.
$obj->size
See size in Mail::Message::Head::Complete.
$obj->wrap( INTEGER )
See wrap in Mail::Message::Head::Complete.

Access to the header

$obj->add( FIELD | LINE | (NAME,BODY[,ATTRS]) )
See add in Mail::Message::Head::Complete.
$obj->addListGroup( OBJECT )
See addListGroup in Mail::Message::Head::Complete.
$obj->addResentGroup( RESENT-GROUP|DATA )
See addResentGroup in Mail::Message::Head::Complete.
$obj->addSpamGroup( OBJECT )
See addSpamGroup in Mail::Message::Head::Complete.
$obj->cleanupOrderedFields

The header maintains a list of fields which are ordered in sequence of definition. It is required to maintain the header order to keep the related fields of resent groups together. The fields are also included in a hash, sorted on their name for fast access.

The references to field objects in the hash are real, those in the ordered list are weak. So when field objects are removed from the hash, their references in the ordered list are automagically undef'd.

When many fields are removed, for instance with removeFields() or removeFieldsExcept(), then it is useful to remove the list of undefs from the ordered list as well. In those cases, this method is called automatically, however you may have your own reasons to call this method.

$obj->count( NAME )
See count in Mail::Message::Head::Complete.
$obj->delete( NAME )
See delete in Mail::Message::Head::Complete.
$obj->get( NAME [,INDEX] )
See get in Mail::Message::Head.
$obj->grepNames( [NAMES|ARRAY-OF-NAMES|REGEXS] )
See grepNames in Mail::Message::Head::Complete.
$obj->listGroup
See listGroup in Mail::Message::Head::Complete.
$obj->names
See names in Mail::Message::Head::Complete.
$obj->print( [FILEHANDLE] )
See print in Mail::Message::Head::Complete.
$obj->printSelected( FILEHANDLE, (STRING|REGEXP)s )
See printSelected in Mail::Message::Head::Complete.
$obj->printUndisclosed( [FILEHANDLE] )
See printUndisclosed in Mail::Message::Head::Complete.
$obj->removeContentInfo
See removeContentInfo in Mail::Message::Head::Complete.
$obj->removeField( FIELD )
See removeField in Mail::Message::Head::Complete.
$obj->removeFields( STRING|REGEXP, [STRING|REGEXP, ...] )

Remove the fields from the header which are exactly named 'STRING' (case insensitive) or match the REGular EXPresssion. Do not forget to add the 'i' modifier to the REGEXP, because fields are case insensitive.

See also removeField() which is used to remove one field object from the header. The reverse specification can be made with removeFieldsExcept().

» Example:
 $head->removeFields('bcc', 'received');
 $head->removeFields( qr/^content-/i );
$obj->removeFieldsExcept( STRING|REGEXP, [STRING|REGEXP, ...] )

Remove all fields from the header which are not equivalent to one of the specified STRINGs (case-insensitive) and which are not matching one of the REGular EXPressions. Do not forget to add the 'i' modifier to the REGEXP, because fields are case insensitive.

See also removeField() which is used to remove one field object from the header. The reverse specification can be made with removeFields().

» Example:
 $head->removeFieldsExcept('subject', qr/^content-/i ); 
 $head->removeFieldsExcept( qw/subject to from sender cc/ );
$obj->removeListGroup

Removes all header lines which are used to administer mailing lists. Which fields that are is explained in Mail::Message::Head::ListGroup. Returned is the number of removed lines.

$obj->removeResentGroups

Removes all header lines which are member of a resent group, which are explained in Mail::Message::Head::ResentGroup. Returned is the number of removed lines.

For removing single groups (for instance because you want to keep the last), use Mail::Message::Head::FieldGroup::delete().

$obj->removeSpamGroups

Removes all header lines which were produced by spam detection and spam-fighting software. Which fields that are is explained in Mail::Message::Head::SpamGroup. Returned is the number of removed lines.

$obj->resentGroups
See resentGroups in Mail::Message::Head::Complete.
$obj->reset( NAME, FIELDS )
See reset in Mail::Message::Head::Complete.
$obj->set( FIELD | LINE | (NAME, BODY [,ATTRS]) )
See set in Mail::Message::Head::Complete.
$obj->spamDetected
See spamDetected in Mail::Message::Head::Complete.
$obj->spamGroups( [NAMES] )
See spamGroups in Mail::Message::Head::Complete.
$obj->string
See string in Mail::Message::Head::Complete.
$obj->study( NAME [,INDEX] )
See study in Mail::Message::Head.

About the body

$obj->guessBodySize
See guessBodySize in Mail::Message::Head.
$obj->guessTimeStamp
See guessTimeStamp in Mail::Message::Head::Complete.
$obj->isMultipart
See isMultipart in Mail::Message::Head.
$obj->recvstamp
See recvstamp in Mail::Message::Head::Complete.
$obj->timestamp
See timestamp in Mail::Message::Head::Complete.

Internals

$obj->addNoRealize( FIELD )
See addNoRealize in Mail::Message::Head.
$obj->addOrderedFields( FIELDS )
See addOrderedFields in Mail::Message::Head.
$obj->createFromLine
See createFromLine in Mail::Message::Head::Complete.
$obj->createMessageId
See createMessageId in Mail::Message::Head::Complete.
$obj->fileLocation
See fileLocation in Mail::Message::Head.
$obj->load
See load in Mail::Message::Head.
$obj->messageIdPrefix( [PREFIX, [HOSTNAME]|CODE] )
$class->messageIdPrefix( [PREFIX, [HOSTNAME]|CODE] )
See messageIdPrefix in Mail::Message::Head::Complete.
$obj->moveLocation( DISTANCE )
See moveLocation in Mail::Message::Head.
$obj->read( PARSER )
See read in Mail::Message::Head.
$obj->setNoRealize( FIELD )
See setNoRealize in Mail::Message::Head.

Error handling

$obj->AUTOLOAD
See AUTOLOAD in Mail::Reporter.
$obj->addReport( OBJECT )
See addReport in Mail::Reporter.
$obj->defaultTrace( [LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK] )
$class->defaultTrace( [LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK] )
See defaultTrace in Mail::Reporter.
$obj->errors
See errors in Mail::Reporter.
$obj->log( [LEVEL [,STRINGS]] )
$class->log( [LEVEL [,STRINGS]] )
See log in Mail::Reporter.
$obj->logPriority( LEVEL )
$class->logPriority( LEVEL )
See logPriority in Mail::Reporter.
$obj->logSettings
See logSettings in Mail::Reporter.
$obj->notImplemented
See notImplemented in Mail::Reporter.
$obj->report( [LEVEL] )
See report in Mail::Reporter.
$obj->reportAll( [LEVEL] )
See reportAll in Mail::Reporter.
$obj->trace( [LEVEL] )
See trace in Mail::Reporter.
$obj->warnings
See warnings in Mail::Reporter.

Cleanup

$obj->DESTROY
See DESTROY in Mail::Reporter.