.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Mail::Message::Body::Multipart 3pm" .TH Mail::Message::Body::Multipart 3pm "2014-08-24" "perl v5.20.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Mail::Message::Body::Multipart \- body of a message with attachments .SH "INHERITANCE" .IX Header "INHERITANCE" .Vb 3 \& Mail::Message::Body::Multipart \& is a Mail::Message::Body \& is a Mail::Reporter .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& See Mail::Message::Body \& \& if($body\->isMultipart) { \& my @attachments = $body\->parts; \& my $attachment3 = $body\->part(2); \& my $before = $body\->preamble; \& my $after = $body\->epilogue; \& $body\->part(1)\->delete; \& } .Ve .SH "DESCRIPTION" .IX Header "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 attachments (parts). .PP Extends \*(L"\s-1DESCRIPTION\*(R"\s0 in Mail::Message::Body. .SH "OVERLOADED" .IX Header "OVERLOADED" Extends \*(L"\s-1OVERLOADED\*(R"\s0 in Mail::Message::Body. .ie n .IP "overload: \fB""""\fR" 4 .el .IP "overload: \fB``''\fR" 4 .IX Item "overload: """"" Inherited, see \*(L"\s-1OVERLOADED\*(R"\s0 in Mail::Message::Body .IP "overload: \fB'==' and '!='\fR" 4 .IX Item "overload: '==' and '!='" Inherited, see \*(L"\s-1OVERLOADED\*(R"\s0 in Mail::Message::Body .IP "overload: \fB@{}\fR" 4 .IX Item "overload: @{}" Inherited, see \*(L"\s-1OVERLOADED\*(R"\s0 in Mail::Message::Body .IP "overload: \fBbool\fR" 4 .IX Item "overload: bool" Inherited, see \*(L"\s-1OVERLOADED\*(R"\s0 in Mail::Message::Body .SH "METHODS" .IX Header "METHODS" Extends \*(L"\s-1METHODS\*(R"\s0 in Mail::Message::Body. .SS "Constructors" .IX Subsection "Constructors" Extends \*(L"Constructors\*(R" in Mail::Message::Body. .ie n .IP "$obj\->\fBclone\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBclone\fR()" 4 .IX Item "$obj->clone()" Inherited, see \*(L"Constructors\*(R" in Mail::Message::Body .IP "Mail::Message::Body::Multipart\->\fBnew\fR(%options)" 4 .IX Item "Mail::Message::Body::Multipart->new(%options)" .Vb 10 \& \-Option \-\-Defined in \-\-Default \& based_on Mail::Message::Body undef \& boundary undef \& charset Mail::Message::Body \*(AqPERL\*(Aq or \& checked Mail::Message::Body \& content_id Mail::Message::Body undef \& data Mail::Message::Body undef \& description Mail::Message::Body undef \& disposition Mail::Message::Body undef \& eol Mail::Message::Body \*(AqNATIVE\*(Aq \& epilogue \*(Aq\*(Aq \& file Mail::Message::Body undef \& log Mail::Reporter \*(AqWARNINGS\*(Aq \& message Mail::Message::Body undef \& mime_type Mail::Message::Body \*(Aqmultipart/mixed\*(Aq \& modified Mail::Message::Body \& parts undef \& preamble undef \& trace Mail::Reporter \*(AqWARNINGS\*(Aq \& transfer_encoding Mail::Message::Body \*(Aqnone\*(Aq .Ve .RS 4 .IP "based_on => \s-1BODY\s0" 2 .IX Item "based_on => BODY" .PD 0 .IP "boundary => \s-1STRING\s0" 2 .IX Item "boundary => STRING" .PD Separator to be used between parts of the message. This separator must be unique in case the message contains nested multiparts (which are not unusual). If \f(CW\*(C`undef\*(C'\fR, a nice unique boundary will be generated. .IP "charset => CHARSET|'\s-1PERL\s0'" 2 .IX Item "charset => CHARSET|'PERL'" .PD 0 .IP "checked => \s-1BOOLEAN\s0" 2 .IX Item "checked => BOOLEAN" .IP "content_id => \s-1STRING\s0" 2 .IX Item "content_id => STRING" .IP "data => ARRAY-OF-LINES | \s-1STRING\s0" 2 .IX Item "data => ARRAY-OF-LINES | STRING" .IP "description => STRING|FIELD" 2 .IX Item "description => STRING|FIELD" .IP "disposition => STRING|FIELD" 2 .IX Item "disposition => STRING|FIELD" .IP "eol => '\s-1CR\s0'|'\s-1LF\s0'|'\s-1CRLF\s0'|'\s-1NATIVE\s0'" 2 .IX Item "eol => 'CR'|'LF'|'CRLF'|'NATIVE'" .IP "epilogue => BODY|STRING" 2 .IX Item "epilogue => BODY|STRING" .PD The text which is included in the main body after the final boundary. This is usually empty, and has no meaning. .Sp Provide a \s-1BODY\s0 object or a \s-1STRING\s0 which will automatically translated into a \f(CW\*(C`text/plain\*(C'\fR body. .IP "file => FILENAME|FILEHANDLE|IOHANDLE" 2 .IX Item "file => FILENAME|FILEHANDLE|IOHANDLE" .PD 0 .IP "log => \s-1LEVEL\s0" 2 .IX Item "log => LEVEL" .IP "message => \s-1MESSAGE\s0" 2 .IX Item "message => MESSAGE" .IP "mime_type => STRING|FIELD|MIME" 2 .IX Item "mime_type => STRING|FIELD|MIME" .IP "modified => \s-1BOOLEAN\s0" 2 .IX Item "modified => BOOLEAN" .IP "parts => \s-1ARRAY\-OF\-\s0(MESSAGES|BODIES)" 2 .IX Item "parts => ARRAY-OF-(MESSAGES|BODIES)" .PD Specifies an initial list of parts in this body. These may be full \&\s-1MESSAGES,\s0 or \s-1BODIES\s0 which transformed into messages before use. Each message is coerced into a Mail::Message::Part object. .Sp MIME::Entity and Mail::Internet objects are acceptable in the list, because they are coercible into Mail::Message::Part's. Values of \f(CW\*(C`undef\*(C'\fR will be skipped silently. .IP "preamble => BODY|STRING" 2 .IX Item "preamble => BODY|STRING" The text which is included in the body before the first part. It is common use to include a text to warn the user that the message is a multipart. However, this was useful in earlier days: most mail agents are very capable in warning the user themselves. .Sp Provide a \s-1BODY\s0 object or a \s-1STRING\s0 which will automatically translated into a text/plain body. .IP "trace => \s-1LEVEL\s0" 2 .IX Item "trace => LEVEL" .PD 0 .IP "transfer_encoding => STRING|FIELD" 2 .IX Item "transfer_encoding => STRING|FIELD" .RE .RS 4 .PD .Sp example: .Sp .Vb 2 \& my $intro = Mail::Message::Body\->new(data => [\*(Aqpart one\*(Aq]); \& my $pgp = Mail::Message::Body\->new(data => [\*(Aqpart three\*(Aq]); \& \& my $body = Mail::Message::Body::Multipart\->new \& ( boundary => time . \*(Aq\-\-it\-s\-mine\*(Aq \& , preamble => "This is a multi\-part message in MIME format.\en\en" \& , parts => [ $intro, $folder\->message(3)\->decoded, $pgp ] \& ); .Ve .RE .SS "Constructing a body" .IX Subsection "Constructing a body" Extends \*(L"Constructing a body\*(R" in Mail::Message::Body. .ie n .IP "$obj\->\fBattach\fR($messages|$bodies)" 4 .el .IP "\f(CW$obj\fR\->\fBattach\fR($messages|$bodies)" 4 .IX Item "$obj->attach($messages|$bodies)" Attach a list of \f(CW$messages\fR to this multipart. A new body is returned. When you specify \f(CW$bodies\fR, they will first be translated into real messages. MIME::Entity and Mail::Internet objects may be specified too. In any case, the parts will be coerced into Mail::Message::Part's. .ie n .IP "$obj\->\fBcheck\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBcheck\fR()" 4 .IX Item "$obj->check()" Inherited, see \*(L"Constructing a body\*(R" in Mail::Message::Body::Encode .ie n .IP "$obj\->\fBconcatenate\fR($components)" 4 .el .IP "\f(CW$obj\fR\->\fBconcatenate\fR($components)" 4 .IX Item "$obj->concatenate($components)" Inherited, see \*(L"Constructing a body\*(R" in Mail::Message::Body::Construct .ie n .IP "$obj\->\fBdecoded\fR(%options)" 4 .el .IP "\f(CW$obj\fR\->\fBdecoded\fR(%options)" 4 .IX Item "$obj->decoded(%options)" Inherited, see \*(L"Constructing a body\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBencode\fR(%options)" 4 .el .IP "\f(CW$obj\fR\->\fBencode\fR(%options)" 4 .IX Item "$obj->encode(%options)" Inherited, see \*(L"Constructing a body\*(R" in Mail::Message::Body::Encode .ie n .IP "$obj\->\fBencoded\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBencoded\fR()" 4 .IX Item "$obj->encoded()" Inherited, see \*(L"Constructing a body\*(R" in Mail::Message::Body::Encode .ie n .IP "$obj\->\fBeol\fR( ['\s-1CR\s0'|'\s-1LF\s0'|'\s-1CRLF\s0'|'\s-1NATIVE\s0'] )" 4 .el .IP "\f(CW$obj\fR\->\fBeol\fR( ['\s-1CR\s0'|'\s-1LF\s0'|'\s-1CRLF\s0'|'\s-1NATIVE\s0'] )" 4 .IX Item "$obj->eol( ['CR'|'LF'|'CRLF'|'NATIVE'] )" Inherited, see \*(L"Constructing a body\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBforeachComponent\fR(\s-1CODE\s0)" 4 .el .IP "\f(CW$obj\fR\->\fBforeachComponent\fR(\s-1CODE\s0)" 4 .IX Item "$obj->foreachComponent(CODE)" Execute the \s-1CODE\s0 for each component of the message: the preamble, the epilogue, and each of the parts. .Sp Each component is a body and is passed as second argument to the \s-1CODE.\s0 The first argument is a reference to this multi-parted body. The \s-1CODE\s0 returns a body object. When any of the returned bodies differs from the body which was passed, then a new multi-part body will be returned. Reference to the not-changed bodies and the changed bodies will be included in that new multi-part. .Sp example: .Sp .Vb 1 \& my $checked = $multi\->foreachComponent(sub {$_[1]\->check}); .Ve .ie n .IP "$obj\->\fBforeachLine\fR((\s-1CODE\s0))" 4 .el .IP "\f(CW$obj\fR\->\fBforeachLine\fR((\s-1CODE\s0))" 4 .IX Item "$obj->foreachLine((CODE))" It is \s-1NOT\s0 possible to call some code for each line of a multipart, because that would not only inflict damage to the body of each message part, but also to the headers and the part separators. .ie n .IP "$obj\->\fBstripSignature\fR(%options)" 4 .el .IP "\f(CW$obj\fR\->\fBstripSignature\fR(%options)" 4 .IX Item "$obj->stripSignature(%options)" Removes all parts which contains data usually defined as being signature. The MIME::Type module provides this knowledge. A new multipart is returned, containing the remaining parts. No \f(CW%options\fR are defined yet, although some may be specified, because this method overrules the \&\f(CW\*(C`stripSignature\*(C'\fR method for normal bodies. .Sp .Vb 4 \& \-Option \-\-Defined in \-\-Default \& max_lines Mail::Message::Body::Construct 10 \& pattern Mail::Message::Body::Construct qr/^\-\-\es?$/ \& result_type Mail::Message::Body::Construct .Ve .RS 4 .IP "max_lines => INTEGER|undef" 2 .IX Item "max_lines => INTEGER|undef" .PD 0 .IP "pattern => REGEX|STRING|CODE" 2 .IX Item "pattern => REGEX|STRING|CODE" .IP "result_type => \s-1CLASS\s0" 2 .IX Item "result_type => CLASS" .RE .RS 4 .RE .ie n .IP "$obj\->\fBunify\fR($body)" 4 .el .IP "\f(CW$obj\fR\->\fBunify\fR($body)" 4 .IX Item "$obj->unify($body)" .PD Inherited, see \*(L"Constructing a body\*(R" in Mail::Message::Body::Encode .SS "The body" .IX Subsection "The body" Extends \*(L"The body\*(R" in Mail::Message::Body. .ie n .IP "$obj\->\fBisDelayed\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBisDelayed\fR()" 4 .IX Item "$obj->isDelayed()" Inherited, see \*(L"The body\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBisMultipart\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBisMultipart\fR()" 4 .IX Item "$obj->isMultipart()" Inherited, see \*(L"The body\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBisNested\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBisNested\fR()" 4 .IX Item "$obj->isNested()" Inherited, see \*(L"The body\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBmessage\fR( [$message] )" 4 .el .IP "\f(CW$obj\fR\->\fBmessage\fR( [$message] )" 4 .IX Item "$obj->message( [$message] )" Inherited, see \*(L"The body\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBpartNumberOf\fR($part)" 4 .el .IP "\f(CW$obj\fR\->\fBpartNumberOf\fR($part)" 4 .IX Item "$obj->partNumberOf($part)" Inherited, see \*(L"The body\*(R" in Mail::Message::Body .SS "About the payload" .IX Subsection "About the payload" Extends \*(L"About the payload\*(R" in Mail::Message::Body. .ie n .IP "$obj\->\fBcharset\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBcharset\fR()" 4 .IX Item "$obj->charset()" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBchecked\fR( [\s-1BOOLEAN\s0] )" 4 .el .IP "\f(CW$obj\fR\->\fBchecked\fR( [\s-1BOOLEAN\s0] )" 4 .IX Item "$obj->checked( [BOOLEAN] )" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBcontentId\fR( [STRING|$field] )" 4 .el .IP "\f(CW$obj\fR\->\fBcontentId\fR( [STRING|$field] )" 4 .IX Item "$obj->contentId( [STRING|$field] )" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBdescription\fR( [STRING|$field] )" 4 .el .IP "\f(CW$obj\fR\->\fBdescription\fR( [STRING|$field] )" 4 .IX Item "$obj->description( [STRING|$field] )" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBdisposition\fR( [STRING|$field] )" 4 .el .IP "\f(CW$obj\fR\->\fBdisposition\fR( [STRING|$field] )" 4 .IX Item "$obj->disposition( [STRING|$field] )" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBdispositionFilename\fR( [$directory] )" 4 .el .IP "\f(CW$obj\fR\->\fBdispositionFilename\fR( [$directory] )" 4 .IX Item "$obj->dispositionFilename( [$directory] )" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body::Encode .ie n .IP "$obj\->\fBisBinary\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBisBinary\fR()" 4 .IX Item "$obj->isBinary()" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body::Encode .ie n .IP "$obj\->\fBisText\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBisText\fR()" 4 .IX Item "$obj->isText()" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body::Encode .ie n .IP "$obj\->\fBmimeType\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBmimeType\fR()" 4 .IX Item "$obj->mimeType()" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBnrLines\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBnrLines\fR()" 4 .IX Item "$obj->nrLines()" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBsize\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBsize\fR()" 4 .IX Item "$obj->size()" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBtransferEncoding\fR( [STRING|$field] )" 4 .el .IP "\f(CW$obj\fR\->\fBtransferEncoding\fR( [STRING|$field] )" 4 .IX Item "$obj->transferEncoding( [STRING|$field] )" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBtype\fR( [STRING|$field] )" 4 .el .IP "\f(CW$obj\fR\->\fBtype\fR( [STRING|$field] )" 4 .IX Item "$obj->type( [STRING|$field] )" Inherited, see \*(L"About the payload\*(R" in Mail::Message::Body .SS "Access to the payload" .IX Subsection "Access to the payload" Extends \*(L"Access to the payload\*(R" in Mail::Message::Body. .ie n .IP "$obj\->\fBboundary\fR( [\s-1STRING\s0] )" 4 .el .IP "\f(CW$obj\fR\->\fBboundary\fR( [\s-1STRING\s0] )" 4 .IX Item "$obj->boundary( [STRING] )" Returns the boundary which is used to separate the parts in this body. If none was read from file, then one will be assigned. With \&\s-1STRING\s0 you explicitly set the boundary to be used. .ie n .IP "$obj\->\fBendsOnNewline\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBendsOnNewline\fR()" 4 .IX Item "$obj->endsOnNewline()" Inherited, see \*(L"Access to the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBepilogue\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBepilogue\fR()" 4 .IX Item "$obj->epilogue()" Returns the epilogue; the text after the last message part (after the last real attachment). The epilogue is stored in a \s-1BODY\s0 object, and its encoding is taken from the general multipart header. .ie n .IP "$obj\->\fBfile\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBfile\fR()" 4 .IX Item "$obj->file()" Inherited, see \*(L"Access to the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBlines\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBlines\fR()" 4 .IX Item "$obj->lines()" Inherited, see \*(L"Access to the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBpart\fR($index)" 4 .el .IP "\f(CW$obj\fR\->\fBpart\fR($index)" 4 .IX Item "$obj->part($index)" Returns only the part with the specified \f(CW$index\fR. You may use a negative value here, which counts from the back in the list. Parts which are flagged to be deleted are included in the count. .Sp example: .Sp .Vb 2 \& $message\->body\->part(2)\->print; \& $body\->part(1)\->delete; .Ve .ie n .IP "$obj\->\fBparts\fR( [<'\s-1ALL\s0'|'\s-1ACTIVE\s0'|'\s-1DELETED\s0'|'\s-1RECURSE\s0'|$filter>] )" 4 .el .IP "\f(CW$obj\fR\->\fBparts\fR( [<'\s-1ALL\s0'|'\s-1ACTIVE\s0'|'\s-1DELETED\s0'|'\s-1RECURSE\s0'|$filter>] )" 4 .IX Item "$obj->parts( [<'ALL'|'ACTIVE'|'DELETED'|'RECURSE'|$filter>] )" Return all parts by default, or when \s-1ALL\s0 is specified. \f(CW\*(C`ACTIVE\*(C'\fR returns the parts which are not flagged for deletion, as opposite to \f(CW\*(C`DELETED\*(C'\fR. \&\f(CW\*(C`RECURSE\*(C'\fR descents into all nested multiparts to collect all parts. .Sp You may also specify a code reference which is called for each nested part. The first argument will be the message part. When the code returns true, the part is incorporated in the return list. .Sp example: .Sp .Vb 2 \& print "Number of attachments: ", \& scalar $message\->body\->parts(\*(AqACTIVE\*(Aq); \& \& foreach my $part ($message\->body\->parts) { \& print "Type: ", $part\->get(\*(AqContent\-Type\*(Aq); \& } .Ve .ie n .IP "$obj\->\fBpreamble\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBpreamble\fR()" 4 .IX Item "$obj->preamble()" Returns the preamble; the text before the first message part (before the first real attachment). The preamble is stored in a \s-1BODY\s0 object, and its encoding is taken from the multipart header. .ie n .IP "$obj\->\fBprint\fR( [$fh] )" 4 .el .IP "\f(CW$obj\fR\->\fBprint\fR( [$fh] )" 4 .IX Item "$obj->print( [$fh] )" Inherited, see \*(L"Access to the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBprintEscapedFrom\fR($fh)" 4 .el .IP "\f(CW$obj\fR\->\fBprintEscapedFrom\fR($fh)" 4 .IX Item "$obj->printEscapedFrom($fh)" Inherited, see \*(L"Access to the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBstring\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBstring\fR()" 4 .IX Item "$obj->string()" Inherited, see \*(L"Access to the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBstripTrailingNewline\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBstripTrailingNewline\fR()" 4 .IX Item "$obj->stripTrailingNewline()" Inherited, see \*(L"Access to the payload\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBwrite\fR(%options)" 4 .el .IP "\f(CW$obj\fR\->\fBwrite\fR(%options)" 4 .IX Item "$obj->write(%options)" Inherited, see \*(L"Access to the payload\*(R" in Mail::Message::Body .SS "Internals" .IX Subsection "Internals" Extends \*(L"Internals\*(R" in Mail::Message::Body. .ie n .IP "$obj\->\fBaddTransferEncHandler\fR( $name, <$class|$object> )" 4 .el .IP "\f(CW$obj\fR\->\fBaddTransferEncHandler\fR( \f(CW$name\fR, <$class|$object> )" 4 .IX Item "$obj->addTransferEncHandler( $name, <$class|$object> )" .PD 0 .ie n .IP "Mail::Message::Body::Multipart\->\fBaddTransferEncHandler\fR( $name, <$class|$object> )" 4 .el .IP "Mail::Message::Body::Multipart\->\fBaddTransferEncHandler\fR( \f(CW$name\fR, <$class|$object> )" 4 .IX Item "Mail::Message::Body::Multipart->addTransferEncHandler( $name, <$class|$object> )" .PD Inherited, see \*(L"Internals\*(R" in Mail::Message::Body::Encode .ie n .IP "$obj\->\fBcontentInfoFrom\fR($head)" 4 .el .IP "\f(CW$obj\fR\->\fBcontentInfoFrom\fR($head)" 4 .IX Item "$obj->contentInfoFrom($head)" Inherited, see \*(L"Internals\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBcontentInfoTo\fR($head)" 4 .el .IP "\f(CW$obj\fR\->\fBcontentInfoTo\fR($head)" 4 .IX Item "$obj->contentInfoTo($head)" Inherited, see \*(L"Internals\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBfileLocation\fR( [$begin, $end] )" 4 .el .IP "\f(CW$obj\fR\->\fBfileLocation\fR( [$begin, \f(CW$end\fR] )" 4 .IX Item "$obj->fileLocation( [$begin, $end] )" Inherited, see \*(L"Internals\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBgetTransferEncHandler\fR($type)" 4 .el .IP "\f(CW$obj\fR\->\fBgetTransferEncHandler\fR($type)" 4 .IX Item "$obj->getTransferEncHandler($type)" Inherited, see \*(L"Internals\*(R" in Mail::Message::Body::Encode .ie n .IP "$obj\->\fBisModified\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBisModified\fR()" 4 .IX Item "$obj->isModified()" Inherited, see \*(L"Internals\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBload\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBload\fR()" 4 .IX Item "$obj->load()" Inherited, see \*(L"Internals\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBmodified\fR( [\s-1BOOLEAN\s0] )" 4 .el .IP "\f(CW$obj\fR\->\fBmodified\fR( [\s-1BOOLEAN\s0] )" 4 .IX Item "$obj->modified( [BOOLEAN] )" Inherited, see \*(L"Internals\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBmoveLocation\fR( [$distance] )" 4 .el .IP "\f(CW$obj\fR\->\fBmoveLocation\fR( [$distance] )" 4 .IX Item "$obj->moveLocation( [$distance] )" Inherited, see \*(L"Internals\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBread\fR( $parser, $head, $bodytype, [$chars, [$lines]] )" 4 .el .IP "\f(CW$obj\fR\->\fBread\fR( \f(CW$parser\fR, \f(CW$head\fR, \f(CW$bodytype\fR, [$chars, [$lines]] )" 4 .IX Item "$obj->read( $parser, $head, $bodytype, [$chars, [$lines]] )" Inherited, see \*(L"Internals\*(R" in Mail::Message::Body .SS "Error handling" .IX Subsection "Error handling" Extends \*(L"Error handling\*(R" in Mail::Message::Body. .ie n .IP "$obj\->\fB\s-1AUTOLOAD\s0\fR()" 4 .el .IP "\f(CW$obj\fR\->\fB\s-1AUTOLOAD\s0\fR()" 4 .IX Item "$obj->AUTOLOAD()" Inherited, see \*(L"Error handling\*(R" in Mail::Message::Body .ie n .IP "$obj\->\fBaddReport\fR($object)" 4 .el .IP "\f(CW$obj\fR\->\fBaddReport\fR($object)" 4 .IX Item "$obj->addReport($object)" Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBdefaultTrace\fR( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )" 4 .el .IP "\f(CW$obj\fR\->\fBdefaultTrace\fR( [$level]|[$loglevel, \f(CW$tracelevel\fR]|[$level, \f(CW$callback\fR] )" 4 .IX Item "$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )" .PD 0 .ie n .IP "Mail::Message::Body::Multipart\->\fBdefaultTrace\fR( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )" 4 .el .IP "Mail::Message::Body::Multipart\->\fBdefaultTrace\fR( [$level]|[$loglevel, \f(CW$tracelevel\fR]|[$level, \f(CW$callback\fR] )" 4 .IX Item "Mail::Message::Body::Multipart->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )" .PD Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBerrors\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBerrors\fR()" 4 .IX Item "$obj->errors()" Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBlog\fR( [$level, [$strings]] )" 4 .el .IP "\f(CW$obj\fR\->\fBlog\fR( [$level, [$strings]] )" 4 .IX Item "$obj->log( [$level, [$strings]] )" .PD 0 .IP "Mail::Message::Body::Multipart\->\fBlog\fR( [$level, [$strings]] )" 4 .IX Item "Mail::Message::Body::Multipart->log( [$level, [$strings]] )" .PD Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBlogPriority\fR($level)" 4 .el .IP "\f(CW$obj\fR\->\fBlogPriority\fR($level)" 4 .IX Item "$obj->logPriority($level)" .PD 0 .IP "Mail::Message::Body::Multipart\->\fBlogPriority\fR($level)" 4 .IX Item "Mail::Message::Body::Multipart->logPriority($level)" .PD Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBlogSettings\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBlogSettings\fR()" 4 .IX Item "$obj->logSettings()" Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBnotImplemented\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBnotImplemented\fR()" 4 .IX Item "$obj->notImplemented()" Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBreport\fR( [$level] )" 4 .el .IP "\f(CW$obj\fR\->\fBreport\fR( [$level] )" 4 .IX Item "$obj->report( [$level] )" Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBreportAll\fR( [$level] )" 4 .el .IP "\f(CW$obj\fR\->\fBreportAll\fR( [$level] )" 4 .IX Item "$obj->reportAll( [$level] )" Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBtrace\fR( [$level] )" 4 .el .IP "\f(CW$obj\fR\->\fBtrace\fR( [$level] )" 4 .IX Item "$obj->trace( [$level] )" Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .ie n .IP "$obj\->\fBwarnings\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBwarnings\fR()" 4 .IX Item "$obj->warnings()" Inherited, see \*(L"Error handling\*(R" in Mail::Reporter .SS "Cleanup" .IX Subsection "Cleanup" Extends \*(L"Cleanup\*(R" in Mail::Message::Body. .ie n .IP "$obj\->\fB\s-1DESTROY\s0\fR()" 4 .el .IP "\f(CW$obj\fR\->\fB\s-1DESTROY\s0\fR()" 4 .IX Item "$obj->DESTROY()" Inherited, see \*(L"Cleanup\*(R" in Mail::Reporter .SH "DETAILS" .IX Header "DETAILS" Extends \*(L"\s-1DETAILS\*(R"\s0 in Mail::Message::Body. .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" .ie n .IP "Warning: Charset $name is not known" 4 .el .IP "Warning: Charset \f(CW$name\fR is not known" 4 .IX Item "Warning: Charset $name is not known" The encoding or decoding of a message body encounters a character set which is not understood by Perl's Encode module. .ie n .IP "Error: Data not convertible to a message (type is $type)" 4 .el .IP "Error: Data not convertible to a message (type is \f(CW$type\fR)" 4 .IX Item "Error: Data not convertible to a message (type is $type)" An object which is not coercable into a Mail::Message::Part object was passed to the initiation. The data is ignored. .ie n .IP "Warning: No decoder defined for transfer encoding $name." 4 .el .IP "Warning: No decoder defined for transfer encoding \f(CW$name\fR." 4 .IX Item "Warning: No decoder defined for transfer encoding $name." The data (message body) is encoded in a way which is not currently understood, therefore no decoding (or recoding) can take place. .ie n .IP "Warning: No encoder defined for transfer encoding $name." 4 .el .IP "Warning: No encoder defined for transfer encoding \f(CW$name\fR." 4 .IX Item "Warning: No encoder defined for transfer encoding $name." The data (message body) has been decoded, but the required encoding is unknown. The decoded data is returned. .ie n .IP "Error: Package $package does not implement $method." 4 .el .IP "Error: Package \f(CW$package\fR does not implement \f(CW$method\fR." 4 .IX Item "Error: Package $package does not implement $method." Fatal error: the specific package (or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. .ie n .IP "Error: Unknown criterium $what to select parts." 4 .el .IP "Error: Unknown criterium \f(CW$what\fR to select parts." 4 .IX Item "Error: Unknown criterium $what to select parts." Valid choices fdr part selections are \f(CW\*(C`ALL\*(C'\fR, \f(CW\*(C`ACTIVE\*(C'\fR, \f(CW\*(C`DELETED\*(C'\fR, \&\f(CW\*(C`RECURSE\*(C'\fR or a code reference. However, some other argument was passed. .ie n .IP "Warning: Unknown line terminator $eol ignored" 4 .el .IP "Warning: Unknown line terminator \f(CW$eol\fR ignored" 4 .IX Item "Warning: Unknown line terminator $eol ignored" .PD 0 .IP "Error: You cannot use foreachLine on a multipart" 4 .IX Item "Error: You cannot use foreachLine on a multipart" .PD \&\fIforeachLine()\fR should be used on decoded message bodies only, because it would attempt to modify part-headers and separators as well, which is clearly not acceptible. .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Mail-Box distribution version 2.117, built on August 24, 2014. Website: \fIhttp://perl.overmeer.net/mailbox/\fR .SH "LICENSE" .IX Header "LICENSE" Copyrights 2001\-2014 by [Mark Overmeer]. For other contributors see ChangeLog. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \fIhttp://www.perl.com/perl/misc/Artistic.html\fR