See Mail::Message::Body if($body->isNested) { my $nest = $body->nested; $nest->delete; }
See SYNOPSIS in Mail::Message::Body
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.
WARNING: Since 2023, at least outlook started to interpret RFC6533 incorrectly. Bodies of type 'message/rfc822' can only be 'nested', but when they (illegally) have Content-Transfer-Encoding, they can now behave like normal message parts (the same as a pdf or image).
See DESCRIPTION in Mail::Message::Body
See Access to the body in Mail::Message::Body
See Body class implementation in Mail::Message::Body
See Data collector bodies in Mail::Message::Body
See Complex bodies in Mail::Message::Body
See Character encoding PERL in Mail::Message::Body