The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mail::Message::Body::Nested - body of a message which contains a message

CLASS INHERITANCE

Mail::Message::Body::Nested is a Mail::Message::Body is a Mail::Reporter

SYNOPSIS

 See Mail::Message::Body, plus

 if($body->isNested) {
    my ($nest) = $body->nested;
    $body->part(1)->delete;
 }

DESCRIPTION

The body (content) of a message can be stored in various ways. In this manual-page you find the description of extra functionality you have when a message contains a nested message, like message/rfc822.

METHODS

Initiation

new OPTIONS
 OPTION               DEFAULT
 based_on             undef
 charset              'us-ascii'
 checked              <false>
 data                 undef
 disposition          undef
 eol                  'NATIVE'
 file                 undef
 log                  'WARNINGS'
 message              undef
 mime_type            'message/rfc822'
 modified             <false>
 nested               undef
 trace                'WARNINGS'
 transfer_encoding    'NONE'
based_on => BODY

See Mail::Message::Body::new(based_on)

charset => STRING

See Mail::Message::Body::new(charset)

checked => BOOLEAN

See Mail::Message::Body::new(checked)

data => ARRAY-OF-LINES | STRING

See Mail::Message::Body::new(data)

disposition => STRING|FIELD

See Mail::Message::Body::new(disposition)

eol => 'CR'|'LF'|'CRLF'|'NATIVE'

See Mail::Message::Body::new(eol)

file => FILENAME|FILEHANDLE|IOHANDLE

See Mail::Message::Body::new(file)

log => LEVEL

See Mail::Reporter::new(log)

message => MESSAGE

See Mail::Message::Body::new(message)

mime_type => STRING|FIELD|MIME

See Mail::Message::Body::new(mime_type)

modified => BOOLEAN

See Mail::Message::Body::new(modified)

nested => MESSAGE-PART

The message which is nested within this one.

trace => LEVEL

See Mail::Reporter::new(trace)

transfer_encoding => STRING|FIELD

See Mail::Message::Body::new(transfer_encoding)

Examples:

 my $intro = Mail::Message::Body->new(data => ...);
 my $body  = Mail::Message::Body::Nested->new(nested  => $intro);

 my $msg   = $folder->message(3);
 my $encaps= Mail::Message::Body::Nested->new(nested => $msg);

The Body

clone

See Mail::Message::Body::clone()

decoded OPTIONS

See Mail::Message::Body::decoded()

isDelayed

See Mail::Message::Body::isDelayed()

isMultipart

See Mail::Message::Body::isMultipart()

isNested

See Mail::Message::Body::isNested()

message [MESSAGE]

See Mail::Message::Body::message()

modified [BOOL]

See Mail::Message::Body::modified()

See Mail::Message::Body::print()

About the Payload

charset

See Mail::Message::Body::charset()

checked [BOOLEAN]

See Mail::Message::Body::checked()

disposition [STRING|FIELD]

See Mail::Message::Body::disposition()

eol ['CR'|'LF'|'CRLF'|'NATIVE']

See Mail::Message::Body::eol()

isBinary

See Mail::Message::Body::Encode::isBinary()

isText

See Mail::Message::Body::Encode::isText()

mimeType

See Mail::Message::Body::mimeType()

nrLines

See Mail::Message::Body::nrLines()

size

See Mail::Message::Body::size()

transferEncoding [STRING|FIELD]

See Mail::Message::Body::transferEncoding()

type

See Mail::Message::Body::type()

Access to the Payload

file

See Mail::Message::Body::file()

forNested CODE

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

lines

See Mail::Message::Body::lines()

nested

Returns the message which is enclosed within this body.

string

See Mail::Message::Body::string()

Constructing a Body

addTransferEncHandler NAME, CLASS|OBJECT

See Mail::Message::Body::Encode::addTransferEncHandler()

attach MESSAGES, OPTIONS

See Mail::Message::Body::Construct::attach()

check

See Mail::Message::Body::Encode::check()

concatenate COMPONENTS

See Mail::Message::Body::Construct::concatenate()

encode OPTIONS

See Mail::Message::Body::Encode::encode()

encoded

See Mail::Message::Body::Encode::encoded()

foreachLine CODE

See Mail::Message::Body::Construct::foreachLine()

getTransferEncHandler TYPE

See Mail::Message::Body::Encode::getTransferEncHandler()

stripSignature OPTIONS

See Mail::Message::Body::Construct::stripSignature()

unify BODY

See Mail::Message::Body::Encode::unify()

Reading and Writing [internals]

AUTOLOAD

See Mail::Message::Body::AUTOLOAD()

fileLocation [BEGIN,END]

See Mail::Message::Body::fileLocation()

load

See Mail::Message::Body::load()

moveLocation [DISTANCE]

See Mail::Message::Body::moveLocation()

read PARSER, HEAD, BODYTYPE [,CHARS [,LINES]]

See Mail::Message::Body::read()

Logging and Tracing

defaultTrace [LEVEL, [LEVEL]

See Mail::Reporter::defaultTrace()

errors

See Mail::Reporter::errors()

log [LEVEL [,STRINGS]]

See Mail::Reporter::log()

report [LEVEL]

See Mail::Reporter::report()

reportAll [LEVEL]

See Mail::Reporter::reportAll()

trace [LEVEL]

See Mail::Reporter::trace()

warnings

See Mail::Reporter::warnings()

Other Methods

DESTROY

See Mail::Reporter::DESTROY()

inGlobalDestruction

See Mail::Reporter::inGlobalDestruction()

logPriority LEVEL

See Mail::Reporter::logPriority()

logSettings

See Mail::Reporter::logSettings()

notImplemented

See Mail::Reporter::notImplemented()

SEE ALSO

A good start to read is Mail::Box-Overview. More documentation and a mailinglist are available from the project's website at http://perl.overmeer.net/mailbox/.

AUTHOR

Mark Overmeer (mark@overmeer.net) with the help of many.

VERSION

This code is beta, version 2.026.

Copyright (c) 2001-2002 Mark Overmeer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.