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