METHODS

See METHODS in Mail::Reporter

Constructors

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

Create a message part.

Option Defined in Default

body

Mail::Message

undef

body_type

Mail::Message

Mail::Message::Body::Lines

container

<required>

deleted

Mail::Message

<false>

field_type

Mail::Message

undef

head

Mail::Message

<empty header>

head_type

Mail::Message

Mail::Message::Head::Complete

labels

Mail::Message

{}

log

Mail::Reporter

'WARNINGS'

messageId

Mail::Message

undef

modified

Mail::Message

<false>

trace

Mail::Reporter

'WARNINGS'

trusted

Mail::Message

<false>

body => OBJECT
body_type => CLASS
container => BODY
Reference to the parental Mail::Message::Body object where this part is a member of. That object may be a Mail::Message::Body::Multipart or a Mail::Message::Body::Nested.
deleted => BOOLEAN
field_type => CLASS
head => OBJECT
head_type => CLASS
labels => ARRAY|HASH
log => LEVEL
messageId => STRING
modified => BOOLEAN
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, $container, $headers )

Shape a message part around a $body. Bodies have information about their content in them, which is used to construct a header for the message. Next to that, more $headers can be specified. No headers are obligatory. No extra headers are fabricated automatically.

» Example:
 my $multi = Mail::Message::Body::Multipart->new;
 my $part  = Mail::Message::Part->buildFromBody($body, $multi);
$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->isDummy
See isDummy in Mail::Message.
$obj->isPart
See isPart in Mail::Message.
$obj->messageId
See messageId in Mail::Message.
$obj->partNumber
See partNumber in Mail::Message.
$obj->print( [$fh] )
See print in Mail::Message.
$obj->printEscapedFrom( $fh )

Prints the message part, but all lines which start with 'From ' will get a leading >. See Mail::Message::Body::printEscapedFrom().

$obj->send( [$mailer], %options )
See send in Mail::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( <$body|$message>, $multipart, @headers )

Transforms a $body or $message to a real message part. The $multipart refers to the parental body.

When ta $body is specified, extra @headers can be supplied as well. Bodies are coerced into message parts by calling buildFromBody(). If you specify a $message residing in a folder, this message will automatically be cloned.

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

Message parts can not be destructed per part: only whole messages can be forcefully freed from memory. Of course, you can delete() separate parts, which only sets a flag not to write a part again. Furthermore, you may cosider rebuild() to get rit of deleted parts.

» Error: You cannot destruct message parts, only whole messages

Message parts can not be destructed per part: only whole messages can be forcefully freed from memory. Consider delete() or rebuild().