METHODS

See METHODS in Mail::Reporter

Constructors

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

body

Mail::Message

undef

body_type

Mail::Box::Message

Mail::Message::Body::Lines

cache_body

<false>

cache_head

<false>

cache_labels

<false>

deleted

Mail::Message

<false>

field_type

Mail::Message

undef

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>

unique

Mail::Box::Net::Message

<unique string>

write_labels

<true>

body => OBJECT
body_type => CODE|CLASS
cache_body => BOOLEAN
cache_head => BOOLEAN
cache_labels => BOOLEAN
All standard IMAP labels can be cached on the local server to improve speed. This has the same dangers as setting write_labels to false. The caching starts when the first label of the message was read.
deleted => BOOLEAN
field_type => CLASS
folder => FOLDER
head => OBJECT
head_type => CLASS
labels => ARRAY|HASH
log => LEVEL
messageId => STRING
modified => BOOLEAN
size => INTEGER
trace => LEVEL
trusted => BOOLEAN
unique => STRING
write_labels => BOOLEAN
When a label is changed or its value read, using label(), that info should be sent to the IMAP server. But, this action could be superfluous, for instance because the label was already set or clear, and communication is expensive. On the other hand, someone else may use IMAP to make changes in the same folder, and will get the updates too late or never...

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->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->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

Returns the size of this message. If the message is still on the remote server, IMAP is used to ask for the size. When the message is already loaded onto the local system, the size of the parsed message is taken. These sizes can differ because the difference in line-ending representation.

$obj->toplevel
See toplevel in Mail::Message.
$obj->unique( [STRING|undef] )
See unique in Mail::Box::Net::Message.
$obj->write( [FILEHANDLE] )
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->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 )

With only one argument, the value related to LABEL is returned. With more that one argument, the list is interpreted a label-value PAIRS to be set.

The IMAP protocol defines its own names for the labels, which must be set imediately to inform other IMAP clients which may have the same folder open. But that can be changed with new(write_labels). Some labels are translated to the corresponding IMAP system labels.

$obj->labels

Get the names of all labels (LIST context, not efficient in IMAP4), or a reference to a hash with labels. You should only use the returned hash to read the labels, because changes made to it will not be passed to the remote server. See labels() to set values.

$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->fetch( [INFO, ...] )

Use the IMAP's UID FETCH IMAP command to get some data about this message. The INFO request is passed to Mail::Box::IMAP4::fetch(). Without INFO, ALL information is retreived and returned as a HASH.

$obj->isDelayed
See isDelayed in Mail::Message.
$obj->loadBody
See loadBody in Mail::Box::Net::Message.
$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.
$obj->writeDelayed( IMAP )

Write all delayed information, like label changes, to the server. This is done under force, so should even be done for folders opened without write-access. This method is called indirectly by a Mail::Box::write() or Mail::Box::close().

The IMAP argument is a Mail::IMAPClient which has the right folder already selected.

Writing changes to the remote folder is not without hassle: IMAP4 (or is it only manual Mail::IMAPClient doesn't support replacing header or body. Therefore, when either of them change, the whole message is rewritten to the server (which is supported), and the original flagged for deletion.

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.