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