METHODS

See METHODS in Mail::Reporter

Constructors

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

Create a messages in a directory organized folder.

Option Defined in Default

body

Mail::Message

undef

body_type

Mail::Box::Message

<from folder>

deleted

Mail::Message

<false>

field_type

Mail::Message

undef

filename

undef

fix_header

false

folder

Mail::Box::Message

<required>

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
filename => FILENAME
The file where the message is stored in.
fix_header => BOOLEAN
See Mail::Box::new(fix_headers).
folder => FOLDER
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( $fh|STRING|SCALAR|ARRAY, %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->filename( [$filename] )

Returns the name of the file in which this message is actually stored. This will return undef when the message is not stored in a file.

$obj->folder( [$folder] )
See folder in Mail::Box::Message.
$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->partNumber
See partNumber in Mail::Message.
$obj->print( [$fh] )
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( [$fh] )
See write in Mail::Message.

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( [$fh|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->create( $filename )

Create the message in the specified file. If the message already has a filename and is not modified, then a move is tried. Otherwise the message is printed to the file. If the $filename already exists for this message, nothing is done. In any case, the new $filename is set as well.

» Error: Cannot write message to $filename: $!

When a modified or new message is written to disk, it is first written to a temporary file in the folder directory. For some reason, it is impossible to create this file.

» Error: Failed to move $new to $filename: $!

When a modified or new message is written to disk, it is first written to a temporary file in the folder directory. Then, the new file is moved to replace the existing file. Apparently, the latter fails.

$obj->diskDelete
See diskDelete in Mail::Box::Message.
$obj->isDelayed
See isDelayed in Mail::Message.
$obj->loadBody

This method is called by the autoloader when the body of the message is needed.

» Error: Unable to read delayed body.

For some reason, the header of the message could be read, but the body cannot. Probably the file has disappeared or the permissions were changed during the progress of the program.

» Error: Unable to read delayed head.

Mail::Box tries to be lazy with respect to parsing messages. When a directory organized folder is opened, only the filenames of messages are collected. At first use, the messages are read from their file. Apperently, a message is used for the first time here, but has disappeared or is unreadible for some other reason.

$obj->loadHead

This method is called by the autoloader when the header of the message is needed.

$obj->parser

Create and return a parser for this message (-file).

» Error: Cannot create parser for $filename.

For some reason (the previous message have told you already) it was not possible to create a message parser for the specified filename.

$obj->readBody( $parser, $head, [$bodytype] )
See readBody in Mail::Box::Message.
$obj->readFromParser( $parser, [$bodytype] )
See readFromParser in Mail::Message.
$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::Reporter.
$obj->destruct
See destruct in Mail::Box::Message.