{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Message::Part (info)\n\n## NAME\n\nMail::Message::Part - a part of a message, but a message by itself\n\n## SYNOPSIS\n\nmy Mail::Message $message = ...;\nif($message->isMultipart) {\nmy Mail::Message::Part $part;\nforeach $part ($message->body->parts) {\n$part->print(\\*OUT);\nmy $attachedhead = $part->head;\nmy $attachedbody = $part->body;      # encoded as read\nmy $attachedbody = $part->decoded;   # transfer-encoding removed\n}\n}\n\n## DESCRIPTION\n\nA \"Mail::Message::Part\" object contains a message which is included in\nthe body of another message.  For instance attachments are parts.\n\n## Sections\n\n- **Mail::Message::Part(3pUser Contributed Perl DocumentatMail::Message::Part(3pm)**\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **DETAILS**\n- **DIAGNOSTICS**\n- **SEE ALSO**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Message::Part",
        "section": "",
        "mode": "info",
        "summary": "Mail::Message::Part - a part of a message, but a message by itself",
        "synopsis": "my Mail::Message $message = ...;\nif($message->isMultipart) {\nmy Mail::Message::Part $part;\nforeach $part ($message->body->parts) {\n$part->print(\\*OUT);\nmy $attachedhead = $part->head;\nmy $attachedbody = $part->body;      # encoded as read\nmy $attachedbody = $part->decoded;   # transfer-encoding removed\n}\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Mail::Message::Part(3pUser Contributed Perl DocumentatMail::Message::Part(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 373,
                "subsections": []
            },
            {
                "name": "DETAILS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 47,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "Mail::Message::Part(3pUser Contributed Perl DocumentatMail::Message::Part(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Mail::Message::Part - a part of a message, but a message by itself\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Message::Part\nis a Mail::Message\nis a Mail::Reporter\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my Mail::Message $message = ...;\nif($message->isMultipart) {\nmy Mail::Message::Part $part;\n\nforeach $part ($message->body->parts) {\n$part->print(\\*OUT);\nmy $attachedhead = $part->head;\nmy $attachedbody = $part->body;      # encoded as read\nmy $attachedbody = $part->decoded;   # transfer-encoding removed\n}\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "A \"Mail::Message::Part\" object contains a message which is included in\nthe body of another message.  For instance attachments are parts.\n\nREAD Mail::Message FIRST.  A part is a special message: it has a\nreference to its parent message, and will usually not be sub-classed\ninto mail folder specific variants.\n\nExtends \"DESCRIPTION\" in Mail::Message.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Extends \"METHODS\" in Mail::Message.\n\nConstructors\nExtends \"Constructors\" in Mail::Message.\n\n$obj->clone(%options)\nInherited, see \"Constructors\" in Mail::Message\n\nMail::Message::Part->new(%options)\nCreate a message part.\n\n-Option    --Defined in     --Default\nbody        Mail::Message    undef\nbodytype   Mail::Message    Mail::Message::Body::Lines\ncontainer                    <required>\ndeleted     Mail::Message    <false>\nfieldtype  Mail::Message    undef\nhead        Mail::Message    <empty header>\nheadtype   Mail::Message    Mail::Message::Head::Complete\nlabels      Mail::Message    {}\nlog         Mail::Reporter   'WARNINGS'\nmessageId   Mail::Message    undef\nmodified    Mail::Message    <false>\ntrace       Mail::Reporter   'WARNINGS'\ntrusted     Mail::Message    <false>\n\nbody => OBJECT\nbodytype => CLASS\ncontainer => BODY\nReference to the parental Mail::Message::Body object where this\npart is a member of.  That object may be a\nMail::Message::Body::Multipart or a Mail::Message::Body::Nested.\n\ndeleted => BOOLEAN\nfieldtype => CLASS\nhead => OBJECT\nheadtype => CLASS\nlabels => ARRAY|HASH\nlog => LEVEL\nmessageId => STRING\nmodified => BOOLEAN\ntrace => LEVEL\ntrusted => BOOLEAN\n\nConstructing a message\nExtends \"Constructing a message\" in Mail::Message.\n\n$obj->bounce( [<$rgobject|%options>] )\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Bounce\n\nMail::Message::Part->build( [$message|$part|$body], $content )\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Build\n\nMail::Message::Part->buildFromBody($body, $container, $headers)\nShape a message part around a $body.  Bodies have information about\ntheir content in them, which is used to construct a header for the\nmessage.  Next to that, more $headers can be specified.  No headers\nare obligatory.  No extra headers are fabricated automatically.\n\nexample:\n\nmy $multi = Mail::Message::Body::Multipart->new;\nmy $part  = Mail::Message::Part->buildFromBody($body, $multi);\n\n$obj->forward(%options)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Forward\n\n$obj->forwardAttach(%options)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Forward\n\n$obj->forwardEncapsulate(%options)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Forward\n\n$obj->forwardInline(%options)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Forward\n\n$obj->forwardNo(%options)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Forward\n\n$obj->forwardPostlude()\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Forward\n\n$obj->forwardPrelude()\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Forward\n\n$obj->forwardSubject(STRING)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Forward\n\nMail::Message::Part->read($fh|STRING|SCALAR|ARRAY, %options)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Read\n\n$obj->rebuild(%options)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Rebuild\n\n$obj->reply(%options)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Reply\n\n$obj->replyPrelude( [STRING|$field|$address|ARRAY-$of-$things] )\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Reply\n\n$obj->replySubject(STRING)\nMail::Message::Part->replySubject(STRING)\nInherited, see \"Constructing a message\" in\nMail::Message::Construct::Reply\n\nThe message\nExtends \"The message\" in Mail::Message.\n\n$obj->container()\nInherited, see \"The message\" in Mail::Message\n\n$obj->isDummy()\nInherited, see \"The message\" in Mail::Message\n\n$obj->isPart()\nInherited, see \"The message\" in Mail::Message\n\n$obj->messageId()\nInherited, see \"The message\" in Mail::Message\n\n$obj->partNumber()\nInherited, see \"The message\" in Mail::Message\n\n$obj->print( [$fh] )\nInherited, see \"The message\" in Mail::Message\n\n$obj->printEscapedFrom($fh)\nPrints the message part, but all lines which start with 'From '\nwill get a leading >.  See Mail::Message::Body::printEscapedFrom().\n\n$obj->send( [$mailer], %options )\nInherited, see \"The message\" in Mail::Message\n\n$obj->size()\nInherited, see \"The message\" in Mail::Message\n\n$obj->toplevel()\nInherited, see \"The message\" in Mail::Message\n\n$obj->write( [$fh] )\nInherited, see \"The message\" in Mail::Message\n\nThe header\nExtends \"The header\" in Mail::Message.\n\n$obj->bcc()\nInherited, see \"The header\" in Mail::Message\n\n$obj->cc()\nInherited, see \"The header\" in Mail::Message\n\n$obj->date()\nInherited, see \"The header\" in Mail::Message\n\n$obj->destinations()\nInherited, see \"The header\" in Mail::Message\n\n$obj->from()\nInherited, see \"The header\" in Mail::Message\n\n$obj->get($fieldname)\nInherited, see \"The header\" in Mail::Message\n\n$obj->guessTimestamp()\nInherited, see \"The header\" in Mail::Message\n\n$obj->head( [$head] )\nInherited, see \"The header\" in Mail::Message\n\n$obj->nrLines()\nInherited, see \"The header\" in Mail::Message\n\n$obj->sender()\nInherited, see \"The header\" in Mail::Message\n\n$obj->study($fieldname)\nInherited, see \"The header\" in Mail::Message\n\n$obj->subject()\nInherited, see \"The header\" in Mail::Message\n\n$obj->timestamp()\nInherited, see \"The header\" in Mail::Message\n\n$obj->to()\nInherited, see \"The header\" in Mail::Message\n\nThe body\nExtends \"The body\" in Mail::Message.\n\n$obj->body( [$body] )\nInherited, see \"The body\" in Mail::Message\n\n$obj->contentType()\nInherited, see \"The body\" in Mail::Message\n\n$obj->decoded(%options)\nInherited, see \"The body\" in Mail::Message\n\n$obj->encode(%options)\nInherited, see \"The body\" in Mail::Message\n\n$obj->isMultipart()\nInherited, see \"The body\" in Mail::Message\n\n$obj->isNested()\nInherited, see \"The body\" in Mail::Message\n\n$obj->parts( [<'ALL'|'ACTIVE'|'DELETED'|'RECURSE'|$filter>] )\nInherited, see \"The body\" in Mail::Message\n\nFlags\nExtends \"Flags\" in Mail::Message.\n\n$obj->delete()\nInherited, see \"Flags\" in Mail::Message\n\n$obj->deleted( [BOOLEAN] )\nInherited, see \"Flags\" in Mail::Message\n\n$obj->isDeleted()\nInherited, see \"Flags\" in Mail::Message\n\n$obj->isModified()\nInherited, see \"Flags\" in Mail::Message\n\n$obj->label($label|PAIRS)\nInherited, see \"Flags\" in Mail::Message\n\n$obj->labels()\nInherited, see \"Flags\" in Mail::Message\n\n$obj->labelsToStatus()\nInherited, see \"Flags\" in Mail::Message\n\n$obj->modified( [BOOLEAN] )\nInherited, see \"Flags\" in Mail::Message\n\n$obj->statusToLabels()\nInherited, see \"Flags\" in Mail::Message\n\nThe whole message as text\nExtends \"The whole message as text\" in Mail::Message.\n\n$obj->file()\nInherited, see \"The whole message as text\" in\nMail::Message::Construct::Text\n\n$obj->lines()\nInherited, see \"The whole message as text\" in\nMail::Message::Construct::Text\n\n$obj->printStructure( [$fh|undef],[$indent] )\nInherited, see \"The whole message as text\" in\nMail::Message::Construct::Text\n\n$obj->string()\nInherited, see \"The whole message as text\" in\nMail::Message::Construct::Text\n\nInternals\nExtends \"Internals\" in Mail::Message.\n\n$obj->clonedFrom()\nInherited, see \"Internals\" in Mail::Message\n\nMail::Message::Part->coerce( <$body|$message>, $multipart, @headers )\nTransforms a $body or $message to a real message part.  The\n$multipart refers to the parental body.\n\nWhen ta $body is specified, extra @headers can be supplied as well.\nBodies are coerced into message parts by calling buildFromBody().\nIf you specify a $message residing in a folder, this message will\nautomatically be cloned.\n\n$obj->isDelayed()\nInherited, see \"Internals\" in Mail::Message\n\n$obj->readBody( $parser, $head, [$bodytype] )\nInherited, see \"Internals\" in Mail::Message\n\n$obj->readFromParser( $parser, [$bodytype] )\nInherited, see \"Internals\" in Mail::Message\n\n$obj->readHead( $parser, [$class] )\nInherited, see \"Internals\" in Mail::Message\n\n$obj->recursiveRebuildPart($part, %options)\nInherited, see \"Internals\" in Mail::Message::Construct::Rebuild\n\n$obj->storeBody($body)\nInherited, see \"Internals\" in Mail::Message\n\n$obj->takeMessageId( [STRING] )\nInherited, see \"Internals\" in Mail::Message\n\nError handling\nExtends \"Error handling\" in Mail::Message.\n\n$obj->AUTOLOAD()\nInherited, see \"METHODS\" in Mail::Message::Construct\n\n$obj->addReport($object)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,\n$callback] )\nMail::Message::Part->defaultTrace( [$level]|[$loglevel,\n$tracelevel]|[$level, $callback] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Message::Part->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Message::Part->logPriority($level)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logSettings()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->notImplemented()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->report( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->reportAll( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->shortSize( [$value] )\nMail::Message::Part->shortSize( [$value] )\nInherited, see \"Error handling\" in Mail::Message\n\n$obj->shortString()\nInherited, see \"Error handling\" in Mail::Message\n\n$obj->trace( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->warnings()\nInherited, see \"Error handling\" in Mail::Reporter\n\nCleanup\nExtends \"Cleanup\" in Mail::Message.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Reporter\n\n$obj->destruct()\nMessage parts can not be destructed per part: only whole messages\ncan be forcefully freed from memory.  Of course, you can delete()\nseparate parts, which only sets a flag not to write a part again.\nFurthermore, you may cosider rebuild() to get rit of deleted parts.\n",
                "subsections": []
            },
            "DETAILS": {
                "content": "Extends \"DETAILS\" in Mail::Message.\n",
                "subsections": []
            },
            "DIAGNOSTICS": {
                "content": "Error: Cannot include forward source as $include.\nUnknown alternative for the forward(include).  Valid choices are\n\"NO\", \"INLINE\", \"ATTACH\", and \"ENCAPSULATE\".\n\nError: Cannot include reply source as $include.\nUnknown alternative for the \"include\" option of reply().  Valid\nchoices are \"NO\", \"INLINE\", and \"ATTACH\".\n\nError: Method bounce requires To, Cc, or Bcc\nThe message bounce() method forwards a received message off to\nsomeone else without modification; you must specified it's new\ndestination.  If you have the urge not to specify any destination,\nyou probably are looking for reply(). When you wish to modify the\ncontent, use forward().\n\nError: Method forwardAttach requires a preamble\nError: Method forwardEncapsulate requires a preamble\nError: No address to create forwarded to.\nIf a forward message is created, a destination address must be\nspecified.\n\nError: No default mailer found to send message.\nThe message send() mechanism had not enough information to\nautomatically find a mail transfer agent to sent this message.\nSpecify a mailer explicitly using the \"via\" options.\n\nError: No rebuild rule $name defined.\nError: Only build() Mail::Message's; they are not in a folder yet\nYou may wish to construct a message to be stored in a some kind of\nfolder, but you need to do that in two steps.  First, create a\nnormal Mail::Message, and then add it to the folder.  During this\nMail::Box::addMessage() process, the message will get coerce()-d\ninto the right message type, adding storage information and the\nlike.\n\nError: Package $package does not implement $method.\nFatal error: the specific package (or one of its superclasses) does\nnot implement this method where it should. This message means that\nsome other related classes do implement this method however the\nclass at hand does not.  Probably you should investigate this and\nprobably inform the author of the package.\n\nError: You cannot destruct message parts, only whole messages\nMessage parts can not be destructed per part: only whole messages\ncan be forcefully freed from memory. Consider delete() or\nrebuild().\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "This module is part of Mail-Message distribution version 3.012, built\non February 11, 2022. Website: http://perl.overmeer.net/CPAN/\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other\ncontributors see ChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.  See http://dev.perl.org/licenses/\n\nperl v5.34.0                      2022-02-14          Mail::Message::Part(3pm)",
                "subsections": []
            }
        }
    }
}