1Mail::Message::Body::NeUssteerd(C3o)ntributed Perl DocumMeanitla:t:iMoenssage::Body::Nested(3)
2
3
4

NAME

6       Mail::Message::Body::Nested - body of a message which contains a
7       message
8

INHERITANCE

10        Mail::Message::Body::Nested
11          is a Mail::Message::Body
12          is a Mail::Reporter
13

SYNOPSIS

15        See Mail::Message::Body
16
17        if($body->isNested) {
18           my $nest = $body->nested;
19           $nest->delete;
20        }
21

DESCRIPTION

23       The body (content) of a message can be stored in various ways.  In this
24       manual-page you find the description of extra functionality you have
25       when a message contains a nested message, like "message/rfc822".
26
27       A nested message is different from a multipart message which contains
28       only one element, because a nested message has a full set of message
29       header fields defined by the RFC882, where a part of a multipart has
30       only a few.  But because we do not keep track whether all fields are
31       presented, a "Mail::Message::Part" is used anyway.
32
33       WARNING: Since 2023, at least outlook started to interpret RFC6533
34       incorrectly.  Bodies of type 'message/rfc822' can only be 'nested', but
35       when they (illegally) have Content-Transfer-Encoding, they can now
36       behave like normal message parts (the same as a pdf or image).
37
38       Extends "DESCRIPTION" in Mail::Message::Body.
39

OVERLOADED

41       Extends "OVERLOADED" in Mail::Message::Body.
42
43       overload: ""
44           Inherited, see "OVERLOADED" in Mail::Message::Body
45
46       overload: '==' and '!='
47           Inherited, see "OVERLOADED" in Mail::Message::Body
48
49       overload: @{}
50           Inherited, see "OVERLOADED" in Mail::Message::Body
51
52       overload: bool
53           Inherited, see "OVERLOADED" in Mail::Message::Body
54

METHODS

56       Extends "METHODS" in Mail::Message::Body.
57
58   Constructors
59       Extends "Constructors" in Mail::Message::Body.
60
61       $obj->clone()
62           Inherited, see "Constructors" in Mail::Message::Body
63
64       Mail::Message::Body::Nested->new(%options)
65            -Option           --Defined in         --Default
66             based_on           Mail::Message::Body  undef
67             charset            Mail::Message::Body  'PERL'
68             checked            Mail::Message::Body  <false>
69             content_id         Mail::Message::Body  undef
70             data               Mail::Message::Body  undef
71             description        Mail::Message::Body  undef
72             disposition        Mail::Message::Body  undef
73             eol                Mail::Message::Body  'NATIVE'
74             file               Mail::Message::Body  undef
75             filename           Mail::Message::Body  undef
76             log                Mail::Reporter       'WARNINGS'
77             message            Mail::Message::Body  undef
78             mime_type          Mail::Message::Body  'message/rfc822'
79             modified           Mail::Message::Body  <false>
80             nested                                  undef
81             trace              Mail::Reporter       'WARNINGS'
82             transfer_encoding  Mail::Message::Body  'none'
83
84           based_on => BODY
85           charset => CHARSET|'PERL'|<undef>
86           checked => BOOLEAN
87           content_id => STRING
88           data => ARRAY-OF-LINES | STRING
89           description => STRING|FIELD
90           disposition => STRING|FIELD
91           eol => 'CR'|'LF'|'CRLF'|'NATIVE'
92           file => FILENAME|FILEHANDLE|IOHANDLE
93           filename => FILENAME
94           log => LEVEL
95           message => MESSAGE
96           mime_type => STRING|FIELD|MIME
97           modified => BOOLEAN
98           nested => MESSAGE
99             The message which is encapsulated within this body.
100
101           trace => LEVEL
102           transfer_encoding => STRING|FIELD
103
104           example:
105
106            my $msg   = $folder->message(3);
107            my $encaps= Mail::Message::Body::Nested->new(nested => $msg);
108
109            # The body will be coerced into a message, which lacks a few
110            # lines but we do not bother.
111            my $intro = Mail::Message::Body->new(data => ...);
112            my $body  = Mail::Message::Body::Nested->new(nested  => $intro);
113
114   Constructing a body
115       Extends "Constructing a body" in Mail::Message::Body.
116
117       $obj->attach($messages, %options)
118           Inherited, see "Constructing a body" in
119           Mail::Message::Body::Construct
120
121       $obj->charsetDetect(%options)
122           Inherited, see "Constructing a body" in Mail::Message::Body::Encode
123
124       Mail::Message::Body::Nested->charsetDetectAlgorithm(
125       [CODE|undef|METHOD] )
126           Inherited, see "Constructing a body" in Mail::Message::Body::Encode
127
128       $obj->check()
129           Inherited, see "Constructing a body" in Mail::Message::Body::Encode
130
131       $obj->concatenate($components)
132           Inherited, see "Constructing a body" in
133           Mail::Message::Body::Construct
134
135       $obj->decoded(%options)
136           Inherited, see "Constructing a body" in Mail::Message::Body
137
138       $obj->encode(%options)
139           Inherited, see "Constructing a body" in Mail::Message::Body::Encode
140
141       $obj->encoded(%options)
142           Inherited, see "Constructing a body" in Mail::Message::Body::Encode
143
144       $obj->eol( ['CR'|'LF'|'CRLF'|'NATIVE'] )
145           Inherited, see "Constructing a body" in Mail::Message::Body
146
147       $obj->foreachLine((CODE))
148           It is NOT possible to call some code for each line of a nested
149           because that would damage the header of the encapsulated message
150
151       $obj->stripSignature(%options)
152           Inherited, see "Constructing a body" in
153           Mail::Message::Body::Construct
154
155       $obj->unify($body)
156           Inherited, see "Constructing a body" in Mail::Message::Body::Encode
157
158   The body
159       Extends "The body" in Mail::Message::Body.
160
161       $obj->isDelayed()
162           Inherited, see "The body" in Mail::Message::Body
163
164       $obj->isMultipart()
165           Inherited, see "The body" in Mail::Message::Body
166
167       $obj->isNested()
168           Inherited, see "The body" in Mail::Message::Body
169
170       $obj->message( [$message] )
171           Inherited, see "The body" in Mail::Message::Body
172
173       $obj->partNumberOf($part)
174           Inherited, see "The body" in Mail::Message::Body
175
176   About the payload
177       Extends "About the payload" in Mail::Message::Body.
178
179       $obj->charset()
180           Inherited, see "About the payload" in Mail::Message::Body
181
182       $obj->checked( [BOOLEAN] )
183           Inherited, see "About the payload" in Mail::Message::Body
184
185       $obj->contentId( [STRING|$field] )
186           Inherited, see "About the payload" in Mail::Message::Body
187
188       $obj->description( [STRING|$field] )
189           Inherited, see "About the payload" in Mail::Message::Body
190
191       $obj->disposition( [STRING|$field] )
192           Inherited, see "About the payload" in Mail::Message::Body
193
194       $obj->dispositionFilename( [$directory] )
195           Inherited, see "About the payload" in Mail::Message::Body::Encode
196
197       $obj->isBinary()
198           Inherited, see "About the payload" in Mail::Message::Body::Encode
199
200       $obj->isText()
201           Inherited, see "About the payload" in Mail::Message::Body::Encode
202
203       $obj->mimeType()
204           Inherited, see "About the payload" in Mail::Message::Body
205
206       $obj->nrLines()
207           Inherited, see "About the payload" in Mail::Message::Body
208
209       $obj->size()
210           Inherited, see "About the payload" in Mail::Message::Body
211
212       $obj->transferEncoding( [STRING|$field] )
213           Inherited, see "About the payload" in Mail::Message::Body
214
215       $obj->type( [STRING|$field] )
216           Inherited, see "About the payload" in Mail::Message::Body
217
218   Access to the payload
219       Extends "Access to the payload" in Mail::Message::Body.
220
221       $obj->endsOnNewline()
222           Inherited, see "Access to the payload" in Mail::Message::Body
223
224       $obj->file()
225           Inherited, see "Access to the payload" in Mail::Message::Body
226
227       $obj->forNested(CODE)
228           Execute the CODE for the nested message.  This returns a new nested
229           body object.  Returns "undef" when the CODE returns "undef".
230
231       $obj->lines()
232           Inherited, see "Access to the payload" in Mail::Message::Body
233
234       $obj->nested()
235           Returns the Mail::Message::Part message which is enclosed within
236           this body.
237
238       $obj->print( [$fh] )
239           Inherited, see "Access to the payload" in Mail::Message::Body
240
241       $obj->printEscapedFrom($fh)
242           Inherited, see "Access to the payload" in Mail::Message::Body
243
244       $obj->string()
245           Inherited, see "Access to the payload" in Mail::Message::Body
246
247       $obj->stripTrailingNewline()
248           Inherited, see "Access to the payload" in Mail::Message::Body
249
250       $obj->write(%options)
251           Inherited, see "Access to the payload" in Mail::Message::Body
252
253   Internals
254       Extends "Internals" in Mail::Message::Body.
255
256       $obj->addTransferEncHandler( $name, <$class|$object> )
257       Mail::Message::Body::Nested->addTransferEncHandler( $name,
258       <$class|$object> )
259           Inherited, see "Internals" in Mail::Message::Body::Encode
260
261       $obj->contentInfoFrom($head)
262           Inherited, see "Internals" in Mail::Message::Body
263
264       $obj->contentInfoTo($head)
265           Inherited, see "Internals" in Mail::Message::Body
266
267       $obj->fileLocation( [$begin, $end] )
268           Inherited, see "Internals" in Mail::Message::Body
269
270       $obj->getTransferEncHandler($type)
271           Inherited, see "Internals" in Mail::Message::Body::Encode
272
273       $obj->isModified()
274           Inherited, see "Internals" in Mail::Message::Body
275
276       $obj->load()
277           Inherited, see "Internals" in Mail::Message::Body
278
279       $obj->modified( [BOOLEAN] )
280           Inherited, see "Internals" in Mail::Message::Body
281
282       $obj->moveLocation( [$distance] )
283           Inherited, see "Internals" in Mail::Message::Body
284
285       $obj->read( $parser, $head, $bodytype, [$chars, [$lines]] )
286           Inherited, see "Internals" in Mail::Message::Body
287
288   Error handling
289       Extends "Error handling" in Mail::Message::Body.
290
291       $obj->AUTOLOAD()
292           Inherited, see "Error handling" in Mail::Message::Body
293
294       $obj->addReport($object)
295           Inherited, see "Error handling" in Mail::Reporter
296
297       $obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,
298       $callback] )
299       Mail::Message::Body::Nested->defaultTrace( [$level]|[$loglevel,
300       $tracelevel]|[$level, $callback] )
301           Inherited, see "Error handling" in Mail::Reporter
302
303       $obj->errors()
304           Inherited, see "Error handling" in Mail::Reporter
305
306       $obj->log( [$level, [$strings]] )
307       Mail::Message::Body::Nested->log( [$level, [$strings]] )
308           Inherited, see "Error handling" in Mail::Reporter
309
310       $obj->logPriority($level)
311       Mail::Message::Body::Nested->logPriority($level)
312           Inherited, see "Error handling" in Mail::Reporter
313
314       $obj->logSettings()
315           Inherited, see "Error handling" in Mail::Reporter
316
317       $obj->notImplemented()
318           Inherited, see "Error handling" in Mail::Reporter
319
320       $obj->report( [$level] )
321           Inherited, see "Error handling" in Mail::Reporter
322
323       $obj->reportAll( [$level] )
324           Inherited, see "Error handling" in Mail::Reporter
325
326       $obj->trace( [$level] )
327           Inherited, see "Error handling" in Mail::Reporter
328
329       $obj->warnings()
330           Inherited, see "Error handling" in Mail::Reporter
331
332   Cleanup
333       Extends "Cleanup" in Mail::Message::Body.
334
335       $obj->DESTROY()
336           Inherited, see "Cleanup" in Mail::Reporter
337

DETAILS

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

DIAGNOSTICS

342       Warning: Charset $name is not known
343           The encoding or decoding of a message body encounters a character
344           set which is not understood by Perl's Encode module.
345
346       Warning: No decoder defined for transfer encoding $name.
347           The data (message body) is encoded in a way which is not currently
348           understood, therefore no decoding (or recoding) can take place.
349
350       Warning: No encoder defined for transfer encoding $name.
351           The data (message body) has been decoded, but the required encoding
352           is unknown.  The decoded data is returned.
353
354       Error: Package $package does not implement $method.
355           Fatal error: the specific package (or one of its superclasses) does
356           not implement this method where it should. This message means that
357           some other related classes do implement this method however the
358           class at hand does not.  Probably you should investigate this and
359           probably inform the author of the package.
360
361       Warning: Unknown line terminator $eol ignored
362       Error: You cannot use foreachLine on a nested
363           foreachLine() should be used on decoded message bodies only,
364           because it would modify the header of the encapsulated message.
365           which is clearly not acceptable.
366

SEE ALSO

368       This module is part of Mail-Message distribution version 3.013, built
369       on June 24, 2023. Website: http://perl.overmeer.net/CPAN/
370

LICENSE

372       Copyrights 2001-2023 by [Mark Overmeer <markov@cpan.org>]. For other
373       contributors see ChangeLog.
374
375       This program is free software; you can redistribute it and/or modify it
376       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
377
378
379
380perl v5.38.0                      2023-07-20    Mail::Message::Body::Nested(3)
Impressum