perldoc > Mail::Message::Body::Nested

๐Ÿท๏ธ NAME

Mail::Message::Body::Nested โ€” body of a message which contains a message

๐Ÿš€ Quick Reference

Use CaseCommandDescription
Check if a body is nested$body->isNested๐Ÿ“Œ Returns true if the body contains a nested message
Access the nested message$body->nested๐Ÿ“Œ Returns the Mail::Message::Part enclosed in this body
Create a new nested bodyMail::Message::Body::Nested->new(nested => $msg)๐Ÿ“Œ Encapsulate a message inside a nested body
Execute code on nested message$body->forNested(CODE)๐Ÿ“Œ Runs CODE on the nested message, returns new nested body or undef
NOTE: Cannot iterate lines$body->foreachLineโš ๏ธ Allowed โ€” would damage the header of the encapsulated message

๐Ÿงฌ INHERITANCE

๐Ÿ“ SYNOPSIS

     See Mail::Message::Body

     if($body->isNested) {
        my $nest = $body->nested;
        $nest->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".

A nested message is different from a multipart message which contains only one element, because a nested message has a full set of message header fields defined by the RFC882, where a part of a multipart has only a few. But because we do not keep track whether all fields are presented, a Mail::Message::Part is used anyway.

Extends "DESCRIPTION" in Mail::Message::Body.

๐Ÿ”„ OVERLOADED

Extends "OVERLOADED" in Mail::Message::Body.

โš™๏ธ METHODS

Extends "METHODS" in Mail::Message::Body.

๐Ÿ› ๏ธ Constructors

Extends "Constructors" in Mail::Message::Body.

Options:

based_onโ€” Mail::Message::BodyDefault: undef
charsetโ€” Mail::Message::BodyDefault: 'PERL' or <undef>
checkedโ€” Mail::Message::BodyDefault: <false>
content_idโ€” Mail::Message::BodyDefault: undef
dataโ€” Mail::Message::BodyDefault: undef
descriptionโ€” Mail::Message::BodyDefault: undef
dispositionโ€” Mail::Message::BodyDefault: undef
eolโ€” Mail::Message::BodyDefault: 'NATIVE'
fileโ€” Mail::Message::BodyDefault: undef
filenameโ€” Mail::Message::BodyDefault: undef
logโ€” Mail::ReporterDefault: 'WARNINGS'
messageโ€” Mail::Message::BodyDefault: undef
mime_typeโ€” Mail::Message::BodyDefault: 'message/rfc822'
modifiedโ€” Mail::Message::BodyDefault: <false>
nestedโ€” Mail::Message::Body::NestedDefault: undef โ€” The message which is encapsulated within this body.
traceโ€” Mail::ReporterDefault: 'WARNINGS'
transfer_encodingโ€” Mail::Message::BodyDefault: 'none'

Examples:

     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

Extends "Constructing a body" in Mail::Message::Body.

๐Ÿ“ฆ The body

Extends "The body" in Mail::Message::Body.

๐Ÿ“ฆ About the payload

Extends "About the payload" in Mail::Message::Body.

๐Ÿ”“ Access to the payload

Extends "Access to the payload" in Mail::Message::Body.

๐Ÿ”ง Internals

Extends "Internals" in Mail::Message::Body.

โš ๏ธ Error handling

Extends "Error handling" in Mail::Message::Body.

๐Ÿงน Cleanup

Extends "Cleanup" in Mail::Message::Body.

๐Ÿ“š DETAILS

Extends "DETAILS" in Mail::Message::Body.

๐Ÿ” DIAGNOSTICS

๐Ÿ”— SEE ALSO

This module is part of Mail-Message distribution version 3.012, built on February 11, 2022. Website: http://perl.overmeer.net/CPAN/

๐Ÿ“„ LICENSE

Copyrights 2001-2022 by [Mark Overmeer <markov AT cpan.org>]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/

Mail::Message::Body::Nested
๐Ÿท๏ธ NAME ๐Ÿš€ Quick Reference ๐Ÿงฌ INHERITANCE ๐Ÿ“ SYNOPSIS ๐Ÿ“– DESCRIPTION ๐Ÿ”„ OVERLOADED โš™๏ธ METHODS
๐Ÿ› ๏ธ Constructors ๐Ÿ—๏ธ Constructing a body ๐Ÿ“ฆ The body ๐Ÿ“ฆ About the payload ๐Ÿ”“ Access to the payload ๐Ÿ”ง Internals โš ๏ธ Error handling ๐Ÿงน Cleanup
๐Ÿ“š DETAILS ๐Ÿ” DIAGNOSTICS ๐Ÿ”— SEE ALSO ๐Ÿ“„ LICENSE

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-27 09:44 @216.73.216.194
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^