=encoding utf8 =head1 NAME Mail::Message::Part - a part of a message, but a message by itself =head1 INHERITANCE Mail::Message::Part is a Mail::Message is a Mail::Reporter =head1 SYNOPSIS my Mail::Message $message = ...; if($message->isMultipart) { my Mail::Message::Part $part; foreach $part ($message->body->parts) { $part->print(\*OUT); my $attached_head = $part->head; my $attached_body = $part->body; # encoded as read my $attached_body = $part->decoded; # transfer-encoding removed } } =head1 DESCRIPTION A C object contains a message which is included in the body of another message. For instance I are I. READ L FIRST. A part is a special message: it has a reference to its parent message, and will usually not be sub-classed into mail folder specific variants. Extends L<"DESCRIPTION" in Mail::Message|Mail::Message/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in Mail::Message|Mail::Message/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Message|Mail::Message/"Constructors">. =over 4 =item $obj-EB(%options) Inherited, see L =item Mail::Message::Part-EB(%options) Create a message part. -Option --Defined in --Default body Mail::Message undef body_type Mail::Message Mail::Message::Body::Lines container deleted Mail::Message field_type Mail::Message undef head Mail::Message head_type Mail::Message Mail::Message::Head::Complete labels Mail::Message {} log Mail::Reporter 'WARNINGS' messageId Mail::Message undef modified Mail::Message trace Mail::Reporter 'WARNINGS' trusted Mail::Message =over 2 =item body => OBJECT =item body_type => CLASS =item container => BODY Reference to the parental L object where this part is a member of. That object may be a L or a L. =item deleted => BOOLEAN =item field_type => CLASS =item head => OBJECT =item head_type => CLASS =item labels => ARRAY|HASH =item log => LEVEL =item messageId => STRING =item modified => BOOLEAN =item trace => LEVEL =item trusted => BOOLEAN =back =back =head2 Constructing a message Extends L<"Constructing a message" in Mail::Message|Mail::Message/"Constructing a message">. =over 4 =item $obj-EB( [<$rg_object|%options>] ) Inherited, see L =item Mail::Message::Part-EB( [$message|$part|$body], $content ) Inherited, see L =item Mail::Message::Part-EB($body, $container, $headers) Shape a message part around a $body. Bodies have information about their content in them, which is used to construct a header for the message. Next to that, more $headers can be specified. No headers are obligatory. No extra headers are fabricated automatically. example: my $multi = Mail::Message::Body::Multipart->new; my $part = Mail::Message::Part->buildFromBody($body, $multi); =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB(STRING) Inherited, see L =item Mail::Message::Part-EB($fh|STRING|SCALAR|ARRAY, %options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB( [STRING|$field|$address|ARRAY-$of-$things] ) Inherited, see L =item $obj-EB(STRING) =item Mail::Message::Part-EB(STRING) Inherited, see L =back =head2 The message Extends L<"The message" in Mail::Message|Mail::Message/"The message">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$fh] ) Inherited, see L =item $obj-EB($fh) Prints the message part, but all lines which start with 'From ' will get a leading E. See L. =item $obj-EB( [$mailer], %options ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$fh] ) Inherited, see L =back =head2 The header Extends L<"The header" in Mail::Message|Mail::Message/"The header">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB($fieldname) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$head] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB($fieldname) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =back =head2 The body Extends L<"The body" in Mail::Message|Mail::Message/"The body">. =over 4 =item $obj-EB( [$body] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [<'ALL'|'ACTIVE'|'DELETED'|'RECURSE'|$filter>] ) Inherited, see L =back =head2 Flags Extends L<"Flags" in Mail::Message|Mail::Message/"Flags">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB( [BOOLEAN] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB