1Mail::Message::Body::NeUssteerd(C3o)ntributed Perl DocumMeanitla:t:iMoenssage::Body::Nested(3)
2
3
4
6 Mail::Message::Body::Nested - body of a message which contains a mes‐
7 sage
8
10 Mail::Message::Body::Nested
11 is a Mail::Message::Body
12 is a Mail::Reporter
13
15 See Mail::Message::Body
16
17 if($body->isNested) {
18 my $nest = $body->nested;
19 $nest->delete;
20 }
21
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
34 overload: ""
35
36 See "OVERLOADED" in Mail::Message::Body
37
38 overload: '==' and '!='
39
40 See "OVERLOADED" in Mail::Message::Body
41
42 overload: @{}
43
44 See "OVERLOADED" in Mail::Message::Body
45
46 overload: bool
47
48 See "OVERLOADED" in Mail::Message::Body
49
51 Constructors
52
53 $obj->clone
54
55 See "Constructors" in Mail::Message::Body
56
57 Mail::Message::Body::Nested->new(OPTIONS)
58
59 Option --Defined in --Default
60 based_on Mail::Message::Body undef
61 charset Mail::Message::Body 'us-ascii'
62 checked Mail::Message::Body <false>
63 data Mail::Message::Body undef
64 description Mail::Message::Body undef
65 disposition Mail::Message::Body undef
66 eol Mail::Message::Body 'NATIVE'
67 file Mail::Message::Body undef
68 log Mail::Reporter 'WARNINGS'
69 message Mail::Message::Body undef
70 mime_type Mail::Message::Body 'message/rfc822'
71 modified Mail::Message::Body <false>
72 nested undef
73 trace Mail::Reporter 'WARNINGS'
74 transfer_encoding Mail::Message::Body 'none'
75
76 . based_on BODY
77
78 . charset STRING
79
80 . checked BOOLEAN
81
82 . data ARRAY-OF-LINES ⎪ STRING
83
84 . description STRING⎪FIELD
85
86 . disposition STRING⎪FIELD
87
88 . eol 'CR'⎪'LF'⎪'CRLF'⎪'NATIVE'
89
90 . file FILENAME⎪FILEHANDLE⎪IOHANDLE
91
92 . log LEVEL
93
94 . message MESSAGE
95
96 . mime_type STRING⎪FIELD⎪MIME
97
98 . modified BOOLEAN
99
100 . nested MESSAGE
101
102 The message which is encapsulated within this body.
103
104 . trace LEVEL
105
106 . transfer_encoding STRING⎪FIELD
107
108 Example:
109
110 my $msg = $folder->message(3);
111 my $encaps= Mail::Message::Body::Nested->new(nested => $msg);
112
113 # The body will be coerced into a message, which lacks a few
114 # lines but we do not bother.
115 my $intro = Mail::Message::Body->new(data => ...);
116 my $body = Mail::Message::Body::Nested->new(nested => $intro);
117
118 Constructing a body
119
120 $obj->attach(MESSAGES, OPTIONS)
121
122 See "Constructing a body" in Mail::Message::Body::Construct
123
124 $obj->check
125
126 See "Constructing a body" in Mail::Message::Body::Encode
127
128 $obj->concatenate(COMPONENTS)
129
130 See "Constructing a body" in Mail::Message::Body::Construct
131
132 $obj->decoded(OPTIONS)
133
134 See "Constructing a body" in Mail::Message::Body
135
136 $obj->encode(OPTIONS)
137
138 See "Constructing a body" in Mail::Message::Body::Encode
139
140 $obj->encoded
141
142 See "Constructing a body" in Mail::Message::Body::Encode
143
144 $obj->eol(['CR'⎪'LF'⎪'CRLF'⎪'NATIVE'])
145
146 See "Constructing a body" in Mail::Message::Body
147
148 $obj->foreachLine((CODE))
149
150 It is NOT possible to call some code for each line of a nested
151 because that would damage the header of the encapsulated message
152
153 $obj->stripSignature(OPTIONS)
154
155 See "Constructing a body" in Mail::Message::Body::Construct
156
157 $obj->unify(BODY)
158
159 See "Constructing a body" in Mail::Message::Body::Encode
160
161 The body
162
163 $obj->isDelayed
164
165 See "The body" in Mail::Message::Body
166
167 $obj->isMultipart
168
169 See "The body" in Mail::Message::Body
170
171 $obj->isNested
172
173 See "The body" in Mail::Message::Body
174
175 $obj->message([MESSAGE])
176
177 See "The body" in Mail::Message::Body
178
179 About the payload
180
181 $obj->charset
182
183 See "About the payload" in Mail::Message::Body
184
185 $obj->checked([BOOLEAN])
186
187 See "About the payload" in Mail::Message::Body
188
189 $obj->description([STRING⎪FIELD])
190
191 See "About the payload" in Mail::Message::Body
192
193 $obj->disposition([STRING⎪FIELD])
194
195 See "About the payload" in Mail::Message::Body
196
197 $obj->dispositionFilename([DIRECTORY])
198
199 See "About the payload" in Mail::Message::Body::Encode
200
201 $obj->isBinary
202
203 See "About the payload" in Mail::Message::Body::Encode
204
205 $obj->isText
206
207 See "About the payload" in Mail::Message::Body::Encode
208
209 $obj->mimeType
210
211 See "About the payload" in Mail::Message::Body
212
213 $obj->nrLines
214
215 See "About the payload" in Mail::Message::Body
216
217 $obj->size
218
219 See "About the payload" in Mail::Message::Body
220
221 $obj->transferEncoding([STRING⎪FIELD])
222
223 See "About the payload" in Mail::Message::Body
224
225 $obj->type([STRING⎪FIELD])
226
227 See "About the payload" in Mail::Message::Body
228
229 Access to the payload
230
231 $obj->endsOnNewline
232
233 See "Access to the payload" in Mail::Message::Body
234
235 $obj->file
236
237 See "Access to the payload" in Mail::Message::Body
238
239 $obj->forNested(CODE)
240
241 Execute the CODE for the nested message. This returns a new nested
242 body object. Returns "undef" when the CODE returns "undef".
243
244 $obj->lines
245
246 See "Access to the payload" in Mail::Message::Body
247
248 $obj->nested
249
250 Returns the Mail::Message::Part message which is enclosed within
251 this body.
252
253 $obj->print([FILEHANDLE])
254
255 See "Access to the payload" in Mail::Message::Body
256
257 $obj->printEscapedFrom(FILEHANDLE)
258
259 See "Access to the payload" in Mail::Message::Body
260
261 $obj->string
262
263 See "Access to the payload" in Mail::Message::Body
264
265 $obj->stripTrailingNewline
266
267 See "Access to the payload" in Mail::Message::Body
268
269 $obj->write(OPTIONS)
270
271 See "Access to the payload" in Mail::Message::Body
272
273 Internals
274
275 $obj->addTransferEncHandler(NAME, CLASS⎪OBJECT)
276
277 Mail::Message::Body::Nested->addTransferEncHandler(NAME, CLASS⎪OBJECT)
278
279 See "Internals" in Mail::Message::Body::Encode
280
281 $obj->contentInfoFrom(HEAD)
282
283 See "Internals" in Mail::Message::Body
284
285 $obj->contentInfoTo(HEAD)
286
287 See "Internals" in Mail::Message::Body
288
289 $obj->fileLocation([BEGIN,END])
290
291 See "Internals" in Mail::Message::Body
292
293 $obj->getTransferEncHandler(TYPE)
294
295 See "Internals" in Mail::Message::Body::Encode
296
297 $obj->isModified
298
299 See "Internals" in Mail::Message::Body
300
301 $obj->load
302
303 See "Internals" in Mail::Message::Body
304
305 $obj->modified([BOOLEAN])
306
307 See "Internals" in Mail::Message::Body
308
309 $obj->moveLocation([DISTANCE])
310
311 See "Internals" in Mail::Message::Body
312
313 $obj->read(PARSER, HEAD, BODYTYPE [,CHARS [,LINES]])
314
315 See "Internals" in Mail::Message::Body
316
317 Error handling
318
319 $obj->AUTOLOAD
320
321 See "Error handling" in Mail::Message::Body
322
323 $obj->addReport(OBJECT)
324
325 See "Error handling" in Mail::Reporter
326
327 $obj->defaultTrace([LEVEL]⎪[LOGLEVEL, TRACELEVEL]⎪[LEVEL, CALLBACK])
328
329 Mail::Message::Body::Nested->defaultTrace([LEVEL]⎪[LOGLEVEL,
330 TRACELEVEL]⎪[LEVEL, CALLBACK])
331
332 See "Error handling" in Mail::Reporter
333
334 $obj->errors
335
336 See "Error handling" in Mail::Reporter
337
338 $obj->log([LEVEL [,STRINGS]])
339
340 Mail::Message::Body::Nested->log([LEVEL [,STRINGS]])
341
342 See "Error handling" in Mail::Reporter
343
344 $obj->logPriority(LEVEL)
345
346 Mail::Message::Body::Nested->logPriority(LEVEL)
347
348 See "Error handling" in Mail::Reporter
349
350 $obj->logSettings
351
352 See "Error handling" in Mail::Reporter
353
354 $obj->notImplemented
355
356 See "Error handling" in Mail::Reporter
357
358 $obj->report([LEVEL])
359
360 See "Error handling" in Mail::Reporter
361
362 $obj->reportAll([LEVEL])
363
364 See "Error handling" in Mail::Reporter
365
366 $obj->trace([LEVEL])
367
368 See "Error handling" in Mail::Reporter
369
370 $obj->warnings
371
372 See "Error handling" in Mail::Reporter
373
374 Cleanup
375
376 $obj->DESTROY
377
378 See "Cleanup" in Mail::Reporter
379
380 $obj->inGlobalDestruction
381
382 See "Cleanup" in Mail::Reporter
383
386 Warning: No decoder defined for transfer encoding $name.
387
388 The data (message body) is encoded in a way which is not currently
389 understood, therefore no decoding (or recoding) can take place.
390
391 Warning: No encoder defined for transfer encoding $name.
392
393 The data (message body) has been decoded, but the required encoding is
394 unknown. The decoded data is returned.
395
396 Error: Package $package does not implement $method.
397
398 Fatal error: the specific package (or one of its superclasses) does not
399 implement this method where it should. This message means that some
400 other related classes do implement this method however the class at
401 hand does not. Probably you should investigate this and probably
402 inform the author of the package.
403
404 Error: You cannot use foreachLine on a nested
405
406 foreachLine() should be used on decoded message bodies only, because it
407 would modify the header of the encapsulated message. which is clearly
408 not acceptible.
409
411 This module is part of Mail-Box distribution version 2.070, built on
412 March 25, 2007. Website: http://perl.overmeer.net/mailbox/
413
415 Copyrights 2001-2007 by Mark Overmeer.For other contributors see
416 ChangeLog.
417
418 This program is free software; you can redistribute it and/or modify it
419 under the same terms as Perl itself. See
420 http://www.perl.com/perl/misc/Artistic.html
421
422
423
424perl v5.8.8 2007-03-25 Mail::Message::Body::Nested(3)