METHODS

See METHODS in Mail::Reporter

Constructors

$obj->clone( OPTIONS )
See clone in Mail::Message.
$class->new( OPTIONS )

Messages in file-based folders use the following options for creation:

Option Defined in Default

body

Mail::Message

undef

body_type

Mail::Box::Message

<from folder>

deleted

Mail::Message

<false>

field_type

Mail::Message

undef

folder

Mail::Box::Message

<required>

from_line

undef

head

Mail::Message

undef

head_type

Mail::Message

Mail::Message::Head::Complete

labels

Mail::Message

{}

log

Mail::Reporter

'WARNINGS'

messageId

Mail::Message

undef

modified

Mail::Message

<false>

size

Mail::Box::Message

undef

trace

Mail::Reporter

'WARNINGS'

trusted

Mail::Message

<false>

body => OBJECT
body_type => CODE|CLASS
deleted => BOOLEAN
field_type => CLASS
folder => FOLDER
from_line => STRING
The line which begins each message in the file. Some people detest this line, but this is just how things were invented...
head => OBJECT
head_type => CLASS
labels => ARRAY|HASH
log => LEVEL
messageId => STRING
modified => BOOLEAN
size => INTEGER
trace => LEVEL
trusted => BOOLEAN

Constructing a message

$obj->bounce( [RG-OBJECT|OPTIONS] )
See bounce in Mail::Message::Construct::Bounce.
$class->build( [MESSAGE|PART|BODY], CONTENT )
See build in Mail::Message::Construct::Build.
$class->buildFromBody( BODY, [HEAD], HEADERS )
See buildFromBody in Mail::Message::Construct::Build.
$obj->forward( OPTIONS )
See forward in Mail::Message::Construct::Forward.
$obj->forwardAttach( OPTIONS )
See forwardAttach in Mail::Message::Construct::Forward.
$obj->forwardEncapsulate( OPTIONS )
See forwardEncapsulate in Mail::Message::Construct::Forward.
$obj->forwardInline( OPTIONS )
See forwardInline in Mail::Message::Construct::Forward.
$obj->forwardNo( OPTIONS )
See forwardNo in Mail::Message::Construct::Forward.
$obj->forwardPostlude
See forwardPostlude in Mail::Message::Construct::Forward.
$obj->forwardPrelude
See forwardPrelude in Mail::Message::Construct::Forward.
$obj->forwardSubject( STRING )
See forwardSubject in Mail::Message::Construct::Forward.
$class->read( FILEHANDLE|SCALAR|REF-SCALAR|ARRAY-OF-LINES, OPTIONS )
See read in Mail::Message::Construct::Read.
$obj->rebuild( OPTIONS )
See rebuild in Mail::Message::Construct::Rebuild.
$obj->reply( OPTIONS )
See reply in Mail::Message::Construct::Reply.
$obj->replyPrelude( [STRING|FIELD|ADDRESS|ARRAY-OF-THINGS] )
See replyPrelude in Mail::Message::Construct::Reply.
$obj->replySubject( STRING )
$class->replySubject( STRING )
See replySubject in Mail::Message::Construct::Reply.

The message

$obj->container
See container in Mail::Message.
$obj->copyTo( FOLDER, OPTIONS )
See copyTo in Mail::Box::Message.
$obj->escapedBody

Mbox folders contain multiple messages in one file, using a separator line to keep them apart. Typically, these lines start with "From ". Lines within the message could interfere with this separator, and should therefore be translated.

This method will return the escaped text of the body as reference.

$obj->folder( [FOLDER] )
See folder in Mail::Box::Message.
$obj->fromLine( [LINE] )

Many people detest file-style folders because they store messages all in one file, where a line starting with From leads the header. If we receive a message from a file-based folder, we store that line. If we write to such a file, but there is no such line stored, then we try to generate one.

If LINE is provided, then the starting line is set to this value.

$obj->isDummy
See isDummy in Mail::Message.
$obj->isPart
See isPart in Mail::Message.
$obj->messageId
See messageId in Mail::Message.
$obj->moveTo( FOLDER, OPTIONS )
See moveTo in Mail::Box::Message.
$obj->print( [FILEHANDLE] )
See print in Mail::Message.
$obj->send( [MAILER], OPTIONS )
See send in Mail::Message.
$obj->seqnr( [INTEGER] )
See seqnr in Mail::Box::Message.
$obj->size
See size in Mail::Message.
$obj->toplevel
See toplevel in Mail::Message.
$obj->write( [FILEHANDLE] )

Write one message to a file handle. It is the message including the leading 'From ' line and trailing blank. The From-line may interfere with lines in the body: those lines are escaped with an extra '>'.

» Example:
 $msg->write(\*FILE);    # print the message with encaps to FILE
 $msg->write;            # message with encaps to selected filehandle
 $msg->print(\*FILE);    # the message without encaps.

The header

$obj->bcc
See bcc in Mail::Message.
$obj->cc
See cc in Mail::Message.
$obj->date
See date in Mail::Message.
$obj->destinations
See destinations in Mail::Message.
$obj->from
See from in Mail::Message.
$obj->get( FIELDNAME )
See get in Mail::Message.
$obj->guessTimestamp
See guessTimestamp in Mail::Message.
$obj->nrLines
See nrLines in Mail::Message.
$obj->sender
See sender in Mail::Message.
$obj->study( FIELDNAME )
See study in Mail::Message.
$obj->subject
See subject in Mail::Message.
$obj->timestamp
See timestamp in Mail::Message.
$obj->to
See to in Mail::Message.

The body

$obj->body( [BODY] )
See body in Mail::Message.
$obj->contentType
See contentType in Mail::Message.
$obj->decoded( OPTIONS )
See decoded in Mail::Message.
$obj->encode( OPTIONS )
See encode in Mail::Message.
$obj->isMultipart
See isMultipart in Mail::Message.
$obj->isNested
See isNested in Mail::Message.
$obj->parts( ['ALL'|'ACTIVE'|'DELETED'|'RECURSE'|FILTER] )
See parts in Mail::Message.

Flags

$obj->delete
See delete in Mail::Message.
$obj->deleted( [BOOLEAN] )
See deleted in Mail::Message.
$obj->isDeleted
See isDeleted in Mail::Message.
$obj->isModified
See isModified in Mail::Message.
$obj->label( LABEL|PAIRS )
See label in Mail::Message.
$obj->labels
See labels in Mail::Message.
$obj->labelsToStatus
See labelsToStatus in Mail::Message.
$obj->modified( [BOOLEAN] )
See modified in Mail::Message.
$obj->statusToLabels
See statusToLabels in Mail::Message.

The whole message as text

$obj->file
See file in Mail::Message::Construct::Text.
$obj->lines
See lines in Mail::Message::Construct::Text.
$obj->printStructure( [FILEHANDLE|undef],[INDENT] )
See printStructure in Mail::Message::Construct::Text.
$obj->string
See string in Mail::Message::Construct::Text.

Internals

$obj->clonedFrom
See clonedFrom in Mail::Message.
$class->coerce( MESSAGE, OPTIONS )
See coerce in Mail::Message.
$obj->diskDelete
See diskDelete in Mail::Box::Message.
$obj->fileLocation

Returns the location of the whole message including the from-line. In LIST context, both begin and end are returned. In SCALAR context, only the begin is passed back.

$obj->isDelayed
See isDelayed in Mail::Message.
$obj->loadBody
» Error: Unable to read delayed body.
$obj->moveLocation( DISTANCE )

The message is relocated in the file, being moved over DISTANCE bytes. Setting a new location will update the according information in the header and body.

$obj->readBody( PARSER, HEAD [, BODYTYPE] )
See readBody in Mail::Box::Message.
$obj->readFromParser( PARSER )

Read one message from a Mail::Box::File based folder, including the leading message separator.

$obj->readHead( PARSER [,CLASS] )
See readHead in Mail::Message.
$obj->recursiveRebuildPart( PART, OPTIONS )
See recursiveRebuildPart in Mail::Message::Construct::Rebuild.
$obj->storeBody( BODY )
See storeBody in Mail::Message.
$obj->takeMessageId( [STRING] )
See takeMessageId in Mail::Message.

Error handling

$obj->AUTOLOAD
See AUTOLOAD in Mail::Message::Construct.
$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->shortSize( [VALUE] )
$class->shortSize( [VALUE] )
See shortSize in Mail::Message.
$obj->shortString
See shortString in Mail::Message.
$obj->trace( [LEVEL] )
See trace in Mail::Reporter.
$obj->warnings
See warnings in Mail::Reporter.

Cleanup

$obj->DESTROY
See DESTROY in Mail::Message.
$obj->destruct
See destruct in Mail::Box::Message.
$obj->inGlobalDestruction
See inGlobalDestruction in Mail::Reporter.