1Mail::Box::MH::Message(U3s)er Contributed Perl DocumentatMiaoinl::Box::MH::Message(3)
2
3
4
6 Mail::Box::MH::Message - one message in an MH-folder
7
9 Mail::Box::MH::Message
10 is a Mail::Box::Dir::Message
11 is a Mail::Box::Message
12 is a Mail::Message
13 is a Mail::Reporter
14
16 my $folder = new Mail::Box::MH ...
17 my $message = $folder->message(10);
18
20 A "Mail::Box::MH::Message" represents one message in an Mail::Box::MH
21 folder . Each message is stored in a separate file, as for all
22 Mail::Box::Dir folder types.
23
25 Constructors
26 $obj->clone(OPTIONS)
27 See "Constructors" in Mail::Message
28
29 Mail::Box::MH::Message->new(OPTIONS)
30 See "METHODS" in Mail::Box::Dir::Message
31
32 Constructing a message
33 $obj->bounce([RG-OBJECT|OPTIONS])
34 See "Constructing a message" in Mail::Message::Construct::Bounce
35
36 Mail::Box::MH::Message->build([MESSAGE|PART|BODY], CONTENT)
37 See "Constructing a message" in Mail::Message::Construct::Build
38
39 Mail::Box::MH::Message->buildFromBody(BODY, [HEAD], HEADERS)
40 See "Constructing a message" in Mail::Message::Construct::Build
41
42 $obj->forward(OPTIONS)
43 See "Constructing a message" in Mail::Message::Construct::Forward
44
45 $obj->forwardAttach(OPTIONS)
46 See "Constructing a message" in Mail::Message::Construct::Forward
47
48 $obj->forwardEncapsulate(OPTIONS)
49 See "Constructing a message" in Mail::Message::Construct::Forward
50
51 $obj->forwardInline(OPTIONS)
52 See "Constructing a message" in Mail::Message::Construct::Forward
53
54 $obj->forwardNo(OPTIONS)
55 See "Constructing a message" in Mail::Message::Construct::Forward
56
57 $obj->forwardPostlude
58 See "Constructing a message" in Mail::Message::Construct::Forward
59
60 $obj->forwardPrelude
61 See "Constructing a message" in Mail::Message::Construct::Forward
62
63 $obj->forwardSubject(STRING)
64 See "Constructing a message" in Mail::Message::Construct::Forward
65
66 Mail::Box::MH::Message->read(FILEHANDLE|SCALAR|REF-SCALAR|ARRAY-OF-LINES,
67 OPTIONS)
68 See "Constructing a message" in Mail::Message::Construct::Read
69
70 $obj->rebuild(OPTIONS)
71 See "Constructing a message" in Mail::Message::Construct::Rebuild
72
73 $obj->reply(OPTIONS)
74 See "Constructing a message" in Mail::Message::Construct::Reply
75
76 $obj->replyPrelude([STRING|FIELD|ADDRESS|ARRAY-OF-THINGS])
77 See "Constructing a message" in Mail::Message::Construct::Reply
78
79 $obj->replySubject(STRING)
80 Mail::Box::MH::Message->replySubject(STRING)
81
82 See "Constructing a message" in Mail::Message::Construct::Reply
83
84 The message
85 $obj->container
86 See "The message" in Mail::Message
87
88 $obj->copyTo(FOLDER, OPTIONS)
89 See "The message" in Mail::Box::Message
90
91 $obj->filename([FILENAME])
92 See "The message" in Mail::Box::Dir::Message
93
94 $obj->folder([FOLDER])
95 See "The message" in Mail::Box::Message
96
97 $obj->isDummy
98 See "The message" in Mail::Message
99
100 $obj->isPart
101 See "The message" in Mail::Message
102
103 $obj->messageId
104 See "The message" in Mail::Message
105
106 $obj->moveTo(FOLDER, OPTIONS)
107 See "The message" in Mail::Box::Message
108
109 $obj->print([FILEHANDLE])
110 See "The message" in Mail::Message
111
112 $obj->send([MAILER], OPTIONS)
113 See "The message" in Mail::Message
114
115 $obj->seqnr([INTEGER])
116 The order of this message in the folder, counted from zero. Do not
117 change the number (unless you understand the implications).
118
119 WARNING: This sequence number has nothing to do with the message's
120 filename, which in case of MH folders are also numbers! If you
121 need that one, use the File::Basename subroutine basename of the
122 filename.
123
124 $obj->size
125 See "The message" in Mail::Message
126
127 $obj->toplevel
128 See "The message" in Mail::Message
129
130 $obj->write([FILEHANDLE])
131 See "The message" in Mail::Message
132
133 The header
134 $obj->bcc
135 See "The header" in Mail::Message
136
137 $obj->cc
138 See "The header" in Mail::Message
139
140 $obj->date
141 See "The header" in Mail::Message
142
143 $obj->destinations
144 See "The header" in Mail::Message
145
146 $obj->from
147 See "The header" in Mail::Message
148
149 $obj->get(FIELDNAME)
150 See "The header" in Mail::Message
151
152 $obj->guessTimestamp
153 See "The header" in Mail::Message
154
155 $obj->head([HEAD])
156 See "The header" in Mail::Message
157
158 $obj->nrLines
159 See "The header" in Mail::Message
160
161 $obj->sender
162 See "The header" in Mail::Message
163
164 $obj->study(FIELDNAME)
165 See "The header" in Mail::Message
166
167 $obj->subject
168 See "The header" in Mail::Message
169
170 $obj->timestamp
171 See "The header" in Mail::Message
172
173 $obj->to
174 See "The header" in Mail::Message
175
176 The body
177 $obj->body([BODY])
178 See "The body" in Mail::Message
179
180 $obj->contentType
181 See "The body" in Mail::Message
182
183 $obj->decoded(OPTIONS)
184 See "The body" in Mail::Message
185
186 $obj->encode(OPTIONS)
187 See "The body" in Mail::Message
188
189 $obj->isMultipart
190 See "The body" in Mail::Message
191
192 $obj->isNested
193 See "The body" in Mail::Message
194
195 $obj->parts(['ALL'|'ACTIVE'|'DELETED'|'RECURSE'|FILTER])
196 See "The body" in Mail::Message
197
198 Flags
199 $obj->delete
200 See "Flags" in Mail::Message
201
202 $obj->deleted([BOOLEAN])
203 See "Flags" in Mail::Message
204
205 $obj->isDeleted
206 See "Flags" in Mail::Message
207
208 $obj->isModified
209 See "Flags" in Mail::Message
210
211 $obj->label(LABEL|PAIRS)
212 See "Flags" in Mail::Message
213
214 $obj->labels
215 See "Flags" in Mail::Message
216
217 $obj->labelsToStatus
218 See "Flags" in Mail::Message
219
220 $obj->modified([BOOLEAN])
221 See "Flags" in Mail::Message
222
223 $obj->statusToLabels
224 See "Flags" in Mail::Message
225
226 The whole message as text
227 $obj->file
228 See "The whole message as text" in Mail::Message::Construct::Text
229
230 $obj->lines
231 See "The whole message as text" in Mail::Message::Construct::Text
232
233 $obj->printStructure([FILEHANDLE|undef],[INDENT])
234 See "The whole message as text" in Mail::Message::Construct::Text
235
236 $obj->string
237 See "The whole message as text" in Mail::Message::Construct::Text
238
239 Internals
240 $obj->clonedFrom
241 See "Internals" in Mail::Message
242
243 Mail::Box::MH::Message->coerce(MESSAGE, OPTIONS)
244 See "Internals" in Mail::Message
245
246 $obj->create(FILENAME)
247 See "Internals" in Mail::Box::Dir::Message
248
249 $obj->diskDelete
250 See "Internals" in Mail::Box::Message
251
252 $obj->isDelayed
253 See "Internals" in Mail::Message
254
255 $obj->loadBody
256 See "Internals" in Mail::Box::Dir::Message
257
258 $obj->loadHead
259 See "Internals" in Mail::Box::Dir::Message
260
261 $obj->parser
262 See "Internals" in Mail::Box::Dir::Message
263
264 $obj->readBody(PARSER, HEAD [, BODYTYPE])
265 See "Internals" in Mail::Box::Message
266
267 $obj->readFromParser(PARSER, [BODYTYPE])
268 See "Internals" in Mail::Message
269
270 $obj->readHead(PARSER [,CLASS])
271 See "Internals" in Mail::Message
272
273 $obj->recursiveRebuildPart(PART, OPTIONS)
274 See "Internals" in Mail::Message::Construct::Rebuild
275
276 $obj->storeBody(BODY)
277 See "Internals" in Mail::Message
278
279 $obj->takeMessageId([STRING])
280 See "Internals" in Mail::Message
281
282 Error handling
283 $obj->AUTOLOAD
284 See "METHODS" in Mail::Message::Construct
285
286 $obj->addReport(OBJECT)
287 See "Error handling" in Mail::Reporter
288
289 $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
290 Mail::Box::MH::Message->defaultTrace([LEVEL]|[LOGLEVEL,
291 TRACELEVEL]|[LEVEL, CALLBACK])
292
293 See "Error handling" in Mail::Reporter
294
295 $obj->errors
296 See "Error handling" in Mail::Reporter
297
298 $obj->log([LEVEL [,STRINGS]])
299 Mail::Box::MH::Message->log([LEVEL [,STRINGS]])
300
301 See "Error handling" in Mail::Reporter
302
303 $obj->logPriority(LEVEL)
304 Mail::Box::MH::Message->logPriority(LEVEL)
305
306 See "Error handling" in Mail::Reporter
307
308 $obj->logSettings
309 See "Error handling" in Mail::Reporter
310
311 $obj->notImplemented
312 See "Error handling" in Mail::Reporter
313
314 $obj->report([LEVEL])
315 See "Error handling" in Mail::Reporter
316
317 $obj->reportAll([LEVEL])
318 See "Error handling" in Mail::Reporter
319
320 $obj->shortSize([VALUE])
321 Mail::Box::MH::Message->shortSize([VALUE])
322
323 See "Error handling" in Mail::Message
324
325 $obj->shortString
326 See "Error handling" in Mail::Message
327
328 $obj->trace([LEVEL])
329 See "Error handling" in Mail::Reporter
330
331 $obj->warnings
332 See "Error handling" in Mail::Reporter
333
334 Cleanup
335 $obj->DESTROY
336 See "Cleanup" in Mail::Message
337
338 $obj->destruct
339 See "Cleanup" in Mail::Box::Message
340
341 $obj->inGlobalDestruction
342 See "Cleanup" in Mail::Reporter
343
345 Structure of a Message
346 The header
347
348 The body
349
350 Message object implementation
351 Message class implementation
352 Labels
353 Predefined labels
354
355 Status and X-Status fields
356
357 The .mh_sequences file
358
359 Typically, the file which contains the labels is called
360 ".mh_sequences". The MH messages are numbered from 1. As example
361 content for ".mh_sequences":
362
363 cur: 93
364 unseen: 32 35-56 67-80
365
366 To generalize labels on messages, two are treated specially:
367
368 · cur
369
370 The "cur" specifies the number of the message where the user
371 stopped reading mail from this folder at last access. Internally
372 in these modules referred to as label "current".
373
374 · unseen
375
376 With "unseen" is listed which message was never read. This must be
377 a mistake in the design of MH: it must be a source of confusion.
378 People should never use labels with a negation in the name:
379
380 if($seen) if(!$unseen) #yuk!
381 if(!$seen) if($unseen)
382 unless($seen) unless($unseen) #yuk!
383
384 So: label "unseen" is translated into "seen" for internal use.
385
387 Error: Cannot coerce a $class object into a $class object
388 Error: Cannot create parser for $filename.
389 For some reason (the previous message have told you already) it was
390 not possible to create a message parser for the specified filename.
391
392 Error: Cannot include forward source as $include.
393 Unknown alternative for the forward(include). Valid choices are
394 "NO", "INLINE", "ATTACH", and "ENCAPSULATE".
395
396 Error: Cannot include reply source as $include.
397 Unknown alternative for the "include" option of reply(). Valid
398 choices are "NO", "INLINE", and "ATTACH".
399
400 Error: Cannot write message to $filename: $!
401 When a modified or new message is written to disk, it is first
402 written to a temporary file in the folder directory. For some
403 reason, it is impossible to create this file.
404
405 Error: Failed to move $new to $filename: $!
406 When a modified or new message is written to disk, it is first
407 written to a temporary file in the folder directory. Then, the new
408 file is moved to replace the existing file. Apparently, the latter
409 fails.
410
411 Error: Method bounce requires To, Cc, or Bcc
412 The message bounce() method forwards a received message off to
413 someone else without modification; you must specified it's new
414 destination. If you have the urge not to specify any destination,
415 you probably are looking for reply(). When you wish to modify the
416 content, use forward().
417
418 Error: Method forwardAttach requires a preamble
419 Error: Method forwardEncapsulate requires a preamble
420 Error: No address to create forwarded to.
421 If a forward message is created, a destination address must be
422 specified.
423
424 Error: No default mailer found to send message.
425 The message send() mechanism had not enough information to
426 automatically find a mail transfer agent to sent this message.
427 Specify a mailer explicitly using the "via" options.
428
429 Error: No rebuild rule $name defined.
430 Error: Only build() Mail::Message's; they are not in a folder yet
431 You may wish to construct a message to be stored in a some kind of
432 folder, but you need to do that in two steps. First, create a
433 normal Mail::Message, and then add it to the folder. During this
434 Mail::Box::addMessage() process, the message will get coerce()-d
435 into the right message type, adding storage information and the
436 like.
437
438 Error: Package $package does not implement $method.
439 Fatal error: the specific package (or one of its superclasses) does
440 not implement this method where it should. This message means that
441 some other related classes do implement this method however the
442 class at hand does not. Probably you should investigate this and
443 probably inform the author of the package.
444
445 Error: Unable to read delayed body.
446 For some reason, the header of the message could be read, but the
447 body cannot. Probably the file has disappeared or the permissions
448 were changed during the progress of the program.
449
450 Error: Unable to read delayed head.
451 Mail::Box tries to be lazy with respect to parsing messages. When
452 a directory organized folder is opened, only the filenames of
453 messages are collected. At first use, the messages are read from
454 their file. Apperently, a message is used for the first time here,
455 but has disappeared or is unreadible for some other reason.
456
457 Error: coercion starts with some object
458
460 This module is part of Mail-Box distribution version 2.097, built on
461 January 26, 2011. Website: http://perl.overmeer.net/mailbox/
462
464 Copyrights 2001-2011 by Mark Overmeer. For other contributors see
465 ChangeLog.
466
467 This program is free software; you can redistribute it and/or modify it
468 under the same terms as Perl itself. See
469 http://www.perl.com/perl/misc/Artistic.html
470
471
472
473perl v5.12.3 2011-01-26 Mail::Box::MH::Message(3)