OVERLOADED

overload: ""
See "" in Mail::Message::Body.
overload: '==' and '!='
See '==' and '!=' in Mail::Message::Body.
overload: @{}
See @{} in Mail::Message::Body.
overload: bool
See bool in Mail::Message::Body.

METHODS

See METHODS in Mail::Reporter

Constructors

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

based_on

Mail::Message::Body

undef

charset

Mail::Message::Body

'PERL' or <undef>

checked

Mail::Message::Body

<false>

content_id

Mail::Message::Body

undef

data

Mail::Message::Body

undef

description

Mail::Message::Body

undef

disposition

Mail::Message::Body

undef

eol

Mail::Message::Body

'NATIVE'

file

Mail::Message::Body

undef

log

Mail::Reporter

'WARNINGS'

message

Mail::Message::Body

undef

mime_type

Mail::Message::Body

'message/rfc822'

modified

Mail::Message::Body

<false>

nested

undef

trace

Mail::Reporter

'WARNINGS'

transfer_encoding

Mail::Message::Body

'none'

based_on => BODY
charset => CHARSET|'PERL'
checked => BOOLEAN
content_id => STRING
data => ARRAY-OF-LINES | STRING
description => STRING|FIELD
disposition => STRING|FIELD
eol => 'CR'|'LF'|'CRLF'|'NATIVE'
file => FILENAME|FILEHANDLE|IOHANDLE
log => LEVEL
message => MESSAGE
mime_type => STRING|FIELD|MIME
modified => BOOLEAN
nested => MESSAGE
The message which is encapsulated within this body.
trace => LEVEL
transfer_encoding => STRING|FIELD
» Example:
 my $msg   = $folder->message(3);
 my $encaps= Mail::Message::Body::Nested->new(nested => $msg);

 # The body will be coerced into a message, which lacks a few
 # lines but we do not bother.
 my $intro = Mail::Message::Body->new(data => ...);
 my $body  = Mail::Message::Body::Nested->new(nested  => $intro);

Constructing a body

$obj->attach( MESSAGES, OPTIONS )
See attach in Mail::Message::Body::Construct.
$obj->check
See check in Mail::Message::Body::Encode.
$obj->concatenate( COMPONENTS )
See concatenate in Mail::Message::Body::Construct.
$obj->decoded( OPTIONS )
See decoded in Mail::Message::Body.
$obj->encode( OPTIONS )
See encode in Mail::Message::Body::Encode.
$obj->encoded
See encoded in Mail::Message::Body::Encode.
$obj->eol( ['CR'|'LF'|'CRLF'|'NATIVE'] )
See eol in Mail::Message::Body.
$obj->foreachLine( (CODE) )

It is NOT possible to call some code for each line of a nested because that would damage the header of the encapsulated message

» Error: You cannot use foreachLine on a nested

foreachLine() should be used on decoded message bodies only, because it would modify the header of the encapsulated message. which is clearly not acceptible.

$obj->stripSignature( OPTIONS )
See stripSignature in Mail::Message::Body::Construct.
$obj->unify( BODY )
See unify in Mail::Message::Body::Encode.

The body

$obj->isDelayed
See isDelayed in Mail::Message::Body.
$obj->isMultipart
See isMultipart in Mail::Message::Body.
$obj->isNested
See isNested in Mail::Message::Body.
$obj->message( [MESSAGE] )
See message in Mail::Message::Body.
$obj->partNumberOf( PART )
See partNumberOf in Mail::Message::Body.

About the payload

$obj->charset
See charset in Mail::Message::Body.
$obj->checked( [BOOLEAN] )
See checked in Mail::Message::Body.
$obj->contentId( [STRING|FIELD] )
See contentId in Mail::Message::Body.
$obj->description( [STRING|FIELD] )
See description in Mail::Message::Body.
$obj->disposition( [STRING|FIELD] )
See disposition in Mail::Message::Body.
$obj->dispositionFilename( [DIRECTORY] )
See dispositionFilename in Mail::Message::Body::Encode.
$obj->isBinary
See isBinary in Mail::Message::Body::Encode.
$obj->isText
See isText in Mail::Message::Body::Encode.
$obj->mimeType
See mimeType in Mail::Message::Body.
$obj->nrLines
See nrLines in Mail::Message::Body.
$obj->size
See size in Mail::Message::Body.
$obj->transferEncoding( [STRING|FIELD] )
See transferEncoding in Mail::Message::Body.
$obj->type( [STRING|FIELD] )
See type in Mail::Message::Body.

Access to the payload

$obj->endsOnNewline
See endsOnNewline in Mail::Message::Body.
$obj->file
See file in Mail::Message::Body.
$obj->forNested( CODE )

Execute the CODE for the nested message. This returns a new nested body object. Returns undef when the CODE returns undef.

$obj->lines
See lines in Mail::Message::Body.
$obj->nested

Returns the Mail::Message::Part message which is enclosed within this body.

$obj->print( [FILEHANDLE] )
See print in Mail::Message::Body.
$obj->printEscapedFrom( FILEHANDLE )
See printEscapedFrom in Mail::Message::Body.
$obj->string
See string in Mail::Message::Body.
$obj->stripTrailingNewline
See stripTrailingNewline in Mail::Message::Body.
$obj->write( OPTIONS )
See write in Mail::Message::Body.

Internals

$obj->addTransferEncHandler( NAME, CLASS|OBJECT )
$class->addTransferEncHandler( NAME, CLASS|OBJECT )
See addTransferEncHandler in Mail::Message::Body::Encode.
$obj->contentInfoFrom( HEAD )
See contentInfoFrom in Mail::Message::Body.
$obj->contentInfoTo( HEAD )
See contentInfoTo in Mail::Message::Body.
$obj->fileLocation( [BEGIN,END] )
See fileLocation in Mail::Message::Body.
$obj->getTransferEncHandler( TYPE )
See getTransferEncHandler in Mail::Message::Body::Encode.
$obj->isModified
See isModified in Mail::Message::Body.
$obj->load
See load in Mail::Message::Body.
$obj->modified( [BOOLEAN] )
See modified in Mail::Message::Body.
$obj->moveLocation( [DISTANCE] )
See moveLocation in Mail::Message::Body.
$obj->read( PARSER, HEAD, BODYTYPE [,CHARS [,LINES]] )
See read in Mail::Message::Body.

Error handling

$obj->AUTOLOAD
See AUTOLOAD in Mail::Message::Body.
$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.