1Mail::Box::MH::Message(U3s)er Contributed Perl DocumentatMiaoinl::Box::MH::Message(3)
2
3
4

NAME

6       Mail::Box::MH::Message - one message in an MH-folder
7

INHERITANCE

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

SYNOPSIS

16        my $folder = new Mail::Box::MH ...
17        my $message = $folder->message(10);
18

DESCRIPTION

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
24       Extends "DESCRIPTION" in Mail::Box::Dir::Message.
25

METHODS

27       Extends "METHODS" in Mail::Box::Dir::Message.
28
29   Constructors
30       Extends "Constructors" in Mail::Box::Dir::Message.
31
32       $obj->clone(%options)
33           Inherited, see "Constructors" in Mail::Message
34
35       Mail::Box::MH::Message->new(%options)
36           Inherited, see "METHODS" in Mail::Box::Dir::Message
37
38   Constructing a message
39       Extends "Constructing a message" in Mail::Box::Dir::Message.
40
41       $obj->bounce( [<$rg_object|%options>] )
42           Inherited, see "Constructing a message" in
43           Mail::Message::Construct::Bounce
44
45       Mail::Box::MH::Message->build( [$message|$part|$body], $content )
46           Inherited, see "Constructing a message" in
47           Mail::Message::Construct::Build
48
49       Mail::Box::MH::Message->buildFromBody($body, [$head], $headers)
50           Inherited, see "Constructing a message" in
51           Mail::Message::Construct::Build
52
53       $obj->forward(%options)
54           Inherited, see "Constructing a message" in
55           Mail::Message::Construct::Forward
56
57       $obj->forwardAttach(%options)
58           Inherited, see "Constructing a message" in
59           Mail::Message::Construct::Forward
60
61       $obj->forwardEncapsulate(%options)
62           Inherited, see "Constructing a message" in
63           Mail::Message::Construct::Forward
64
65       $obj->forwardInline(%options)
66           Inherited, see "Constructing a message" in
67           Mail::Message::Construct::Forward
68
69       $obj->forwardNo(%options)
70           Inherited, see "Constructing a message" in
71           Mail::Message::Construct::Forward
72
73       $obj->forwardPostlude()
74           Inherited, see "Constructing a message" in
75           Mail::Message::Construct::Forward
76
77       $obj->forwardPrelude()
78           Inherited, see "Constructing a message" in
79           Mail::Message::Construct::Forward
80
81       $obj->forwardSubject(STRING)
82           Inherited, see "Constructing a message" in
83           Mail::Message::Construct::Forward
84
85       Mail::Box::MH::Message->read($fh|STRING|SCALAR|ARRAY, %options)
86           Inherited, see "Constructing a message" in
87           Mail::Message::Construct::Read
88
89       $obj->rebuild(%options)
90           Inherited, see "Constructing a message" in
91           Mail::Message::Construct::Rebuild
92
93       $obj->reply(%options)
94           Inherited, see "Constructing a message" in
95           Mail::Message::Construct::Reply
96
97       $obj->replyPrelude( [STRING|$field|$address|ARRAY-$of-$things] )
98           Inherited, see "Constructing a message" in
99           Mail::Message::Construct::Reply
100
101       $obj->replySubject(STRING)
102       Mail::Box::MH::Message->replySubject(STRING)
103           Inherited, see "Constructing a message" in
104           Mail::Message::Construct::Reply
105
106   The message
107       Extends "The message" in Mail::Box::Dir::Message.
108
109       $obj->container()
110           Inherited, see "The message" in Mail::Message
111
112       $obj->copyTo($folder, %options)
113           Inherited, see "The message" in Mail::Box::Message
114
115       $obj->filename( [$filename] )
116           Inherited, see "The message" in Mail::Box::Dir::Message
117
118       $obj->folder( [$folder] )
119           Inherited, see "The message" in Mail::Box::Message
120
121       $obj->isDummy()
122           Inherited, see "The message" in Mail::Message
123
124       $obj->isPart()
125           Inherited, see "The message" in Mail::Message
126
127       $obj->messageId()
128           Inherited, see "The message" in Mail::Message
129
130       $obj->moveTo($folder, %options)
131           Inherited, see "The message" in Mail::Box::Message
132
133       $obj->partNumber()
134           Inherited, see "The message" in Mail::Message
135
136       $obj->print( [$fh] )
137           Inherited, see "The message" in Mail::Message
138
139       $obj->send( [$mailer], %options )
140           Inherited, see "The message" in Mail::Message
141
142       $obj->seqnr( [$integer] )
143           The order of this message in the folder, counted from zero.  Do not
144           change the number (unless you understand the implications).
145
146           WARNING:  This sequence number has nothing to do with the message's
147           filename, which in case of MH folders are also numbers!  If you
148           need that one, use the File::Basename subroutine basename of the
149           filename.
150
151       $obj->size()
152           Inherited, see "The message" in Mail::Message
153
154       $obj->toplevel()
155           Inherited, see "The message" in Mail::Message
156
157       $obj->write( [$fh] )
158           Inherited, see "The message" in Mail::Message
159
160   The header
161       Extends "The header" in Mail::Box::Dir::Message.
162
163       $obj->bcc()
164           Inherited, see "The header" in Mail::Message
165
166       $obj->cc()
167           Inherited, see "The header" in Mail::Message
168
169       $obj->date()
170           Inherited, see "The header" in Mail::Message
171
172       $obj->destinations()
173           Inherited, see "The header" in Mail::Message
174
175       $obj->from()
176           Inherited, see "The header" in Mail::Message
177
178       $obj->get($fieldname)
179           Inherited, see "The header" in Mail::Message
180
181       $obj->guessTimestamp()
182           Inherited, see "The header" in Mail::Message
183
184       $obj->head( [$head] )
185           Inherited, see "The header" in Mail::Message
186
187       $obj->nrLines()
188           Inherited, see "The header" in Mail::Message
189
190       $obj->sender()
191           Inherited, see "The header" in Mail::Message
192
193       $obj->study($fieldname)
194           Inherited, see "The header" in Mail::Message
195
196       $obj->subject()
197           Inherited, see "The header" in Mail::Message
198
199       $obj->timestamp()
200           Inherited, see "The header" in Mail::Message
201
202       $obj->to()
203           Inherited, see "The header" in Mail::Message
204
205   The body
206       Extends "The body" in Mail::Box::Dir::Message.
207
208       $obj->body( [$body] )
209           Inherited, see "The body" in Mail::Message
210
211       $obj->contentType()
212           Inherited, see "The body" in Mail::Message
213
214       $obj->decoded(%options)
215           Inherited, see "The body" in Mail::Message
216
217       $obj->encode(%options)
218           Inherited, see "The body" in Mail::Message
219
220       $obj->isMultipart()
221           Inherited, see "The body" in Mail::Message
222
223       $obj->isNested()
224           Inherited, see "The body" in Mail::Message
225
226       $obj->parts( [<'ALL'|'ACTIVE'|'DELETED'|'RECURSE'|$filter>] )
227           Inherited, see "The body" in Mail::Message
228
229   Flags
230       Extends "Flags" in Mail::Box::Dir::Message.
231
232       $obj->delete()
233           Inherited, see "Flags" in Mail::Message
234
235       $obj->deleted( [BOOLEAN] )
236           Inherited, see "Flags" in Mail::Message
237
238       $obj->isDeleted()
239           Inherited, see "Flags" in Mail::Message
240
241       $obj->isModified()
242           Inherited, see "Flags" in Mail::Message
243
244       $obj->label($label|PAIRS)
245           Inherited, see "Flags" in Mail::Message
246
247       $obj->labels()
248           Inherited, see "Flags" in Mail::Message
249
250       $obj->labelsToStatus()
251           Inherited, see "Flags" in Mail::Message
252
253       $obj->modified( [BOOLEAN] )
254           Inherited, see "Flags" in Mail::Message
255
256       $obj->statusToLabels()
257           Inherited, see "Flags" in Mail::Message
258
259   The whole message as text
260       Extends "The whole message as text" in Mail::Box::Dir::Message.
261
262       $obj->file()
263           Inherited, see "The whole message as text" in
264           Mail::Message::Construct::Text
265
266       $obj->lines()
267           Inherited, see "The whole message as text" in
268           Mail::Message::Construct::Text
269
270       $obj->printStructure( [$fh|undef],[$indent] )
271           Inherited, see "The whole message as text" in
272           Mail::Message::Construct::Text
273
274       $obj->string()
275           Inherited, see "The whole message as text" in
276           Mail::Message::Construct::Text
277
278   Internals
279       Extends "Internals" in Mail::Box::Dir::Message.
280
281       $obj->clonedFrom()
282           Inherited, see "Internals" in Mail::Message
283
284       Mail::Box::MH::Message->coerce($message, %options)
285           Inherited, see "Internals" in Mail::Message
286
287       $obj->create($filename)
288           Inherited, see "Internals" in Mail::Box::Dir::Message
289
290       $obj->diskDelete()
291           Inherited, see "Internals" in Mail::Box::Message
292
293       $obj->isDelayed()
294           Inherited, see "Internals" in Mail::Message
295
296       $obj->loadBody()
297           Inherited, see "Internals" in Mail::Box::Dir::Message
298
299       $obj->loadHead()
300           Inherited, see "Internals" in Mail::Box::Dir::Message
301
302       $obj->parser()
303           Inherited, see "Internals" in Mail::Box::Dir::Message
304
305       $obj->readBody( $parser, $head, [$bodytype] )
306           Inherited, see "Internals" in Mail::Box::Message
307
308       $obj->readFromParser( $parser, [$bodytype] )
309           Inherited, see "Internals" in Mail::Message
310
311       $obj->readHead( $parser, [$class] )
312           Inherited, see "Internals" in Mail::Message
313
314       $obj->recursiveRebuildPart($part, %options)
315           Inherited, see "Internals" in Mail::Message::Construct::Rebuild
316
317       $obj->storeBody($body)
318           Inherited, see "Internals" in Mail::Message
319
320       $obj->takeMessageId( [STRING] )
321           Inherited, see "Internals" in Mail::Message
322
323   Error handling
324       Extends "Error handling" in Mail::Box::Dir::Message.
325
326       $obj->AUTOLOAD()
327           Inherited, see "METHODS" in Mail::Message::Construct
328
329       $obj->addReport($object)
330           Inherited, see "Error handling" in Mail::Reporter
331
332       $obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,
333       $callback] )
334       Mail::Box::MH::Message->defaultTrace( [$level]|[$loglevel,
335       $tracelevel]|[$level, $callback] )
336           Inherited, see "Error handling" in Mail::Reporter
337
338       $obj->errors()
339           Inherited, see "Error handling" in Mail::Reporter
340
341       $obj->log( [$level, [$strings]] )
342       Mail::Box::MH::Message->log( [$level, [$strings]] )
343           Inherited, see "Error handling" in Mail::Reporter
344
345       $obj->logPriority($level)
346       Mail::Box::MH::Message->logPriority($level)
347           Inherited, see "Error handling" in Mail::Reporter
348
349       $obj->logSettings()
350           Inherited, see "Error handling" in Mail::Reporter
351
352       $obj->notImplemented()
353           Inherited, see "Error handling" in Mail::Reporter
354
355       $obj->report( [$level] )
356           Inherited, see "Error handling" in Mail::Reporter
357
358       $obj->reportAll( [$level] )
359           Inherited, see "Error handling" in Mail::Reporter
360
361       $obj->shortSize( [$value] )
362       Mail::Box::MH::Message->shortSize( [$value] )
363           Inherited, see "Error handling" in Mail::Message
364
365       $obj->shortString()
366           Inherited, see "Error handling" in Mail::Message
367
368       $obj->trace( [$level] )
369           Inherited, see "Error handling" in Mail::Reporter
370
371       $obj->warnings()
372           Inherited, see "Error handling" in Mail::Reporter
373
374   Cleanup
375       Extends "Cleanup" in Mail::Box::Dir::Message.
376
377       $obj->DESTROY()
378           Inherited, see "Cleanup" in Mail::Reporter
379
380       $obj->destruct()
381           Inherited, see "Cleanup" in Mail::Box::Message
382

DETAILS

384       Extends "DETAILS" in Mail::Box::Dir::Message.
385
386   Structure of a Message
387       Extends "Structure of a Message" in Mail::Box::Dir::Message.
388
389   Message object implementation
390       Extends "Message object implementation" in Mail::Box::Dir::Message.
391
392   Message class implementation
393       Extends "Message class implementation" in Mail::Box::Dir::Message.
394
395   Labels
396       Extends "Labels" in Mail::Box::Dir::Message.
397
398       Predefined labels
399
400       Extends "Predefined labels" in Mail::Box::Dir::Message.
401
402       Status and X-Status fields
403
404       Extends "Status and X-Status fields" in Mail::Box::Dir::Message.
405
406       The .mh_sequences file
407
408       Typically, the file which contains the labels is called
409       ".mh_sequences".  The MH messages are numbered from 1.  As example
410       content for ".mh_sequences":
411
412        cur: 93
413        unseen: 32 35-56 67-80
414
415       To generalize labels on messages, two are treated specially:
416
417       •   cur
418
419           The "cur" specifies the number of the message where the user
420           stopped reading mail from this folder at last access.  Internally
421           in these modules referred to as label "current".
422
423       •   unseen
424
425           With "unseen" is listed which message was never read.  This must be
426           a mistake in the design of MH: it must be a source of confusion.
427           People should never use labels with a negation in the name:
428
429            if($seen)           if(!$unseen)    #yuk!
430            if(!$seen)          if($unseen)
431            unless($seen)       unless($unseen) #yuk!
432
433           So: label "unseen" is translated into "seen" for internal use.
434

DIAGNOSTICS

436       Error: Cannot coerce a $class object into a $class object
437       Error: Cannot create parser for $filename.
438           For some reason (the previous message have told you already) it was
439           not possible to create a message parser for the specified filename.
440
441       Error: Cannot include forward source as $include.
442           Unknown alternative for the forward(include).  Valid choices are
443           "NO", "INLINE", "ATTACH", and "ENCAPSULATE".
444
445       Error: Cannot include reply source as $include.
446           Unknown alternative for the "include" option of reply().  Valid
447           choices are "NO", "INLINE", and "ATTACH".
448
449       Error: Cannot write message to $filename: $!
450           When a modified or new message is written to disk, it is first
451           written to a temporary file in the folder directory.  For some
452           reason, it is impossible to create this file.
453
454       Error: Failed to move $new to $filename: $!
455           When a modified or new message is written to disk, it is first
456           written to a temporary file in the folder directory.  Then, the new
457           file is moved to replace the existing file.  Apparently, the latter
458           fails.
459
460       Error: Method bounce requires To, Cc, or Bcc
461           The message bounce() method forwards a received message off to
462           someone else without modification; you must specified it's new
463           destination.  If you have the urge not to specify any destination,
464           you probably are looking for reply(). When you wish to modify the
465           content, use forward().
466
467       Error: Method forwardAttach requires a preamble
468       Error: Method forwardEncapsulate requires a preamble
469       Error: No address to create forwarded to.
470           If a forward message is created, a destination address must be
471           specified.
472
473       Error: No default mailer found to send message.
474           The message send() mechanism had not enough information to
475           automatically find a mail transfer agent to sent this message.
476           Specify a mailer explicitly using the "via" options.
477
478       Error: No rebuild rule $name defined.
479       Error: Only build() Mail::Message's; they are not in a folder yet
480           You may wish to construct a message to be stored in a some kind of
481           folder, but you need to do that in two steps.  First, create a
482           normal Mail::Message, and then add it to the folder.  During this
483           Mail::Box::addMessage() process, the message will get coerce()-d
484           into the right message type, adding storage information and the
485           like.
486
487       Error: Package $package does not implement $method.
488           Fatal error: the specific package (or one of its superclasses) does
489           not implement this method where it should. This message means that
490           some other related classes do implement this method however the
491           class at hand does not.  Probably you should investigate this and
492           probably inform the author of the package.
493
494       Error: Unable to read delayed body.
495           For some reason, the header of the message could be read, but the
496           body cannot.  Probably the file has disappeared or the permissions
497           were changed during the progress of the program.
498
499       Error: Unable to read delayed head.
500           Mail::Box tries to be lazy with respect to parsing messages.  When
501           a directory organized folder is opened, only the filenames of
502           messages are collected.  At first use, the messages are read from
503           their file.  Apperently, a message is used for the first time here,
504           but has disappeared or is unreadible for some other reason.
505
506       Error: coercion starts with some object
507

SEE ALSO

509       This module is part of Mail-Box distribution version 3.009, built on
510       August 18, 2020. Website: http://perl.overmeer.net/CPAN/
511

LICENSE

513       Copyrights 2001-2020 by [Mark Overmeer]. For other contributors see
514       ChangeLog.
515
516       This program is free software; you can redistribute it and/or modify it
517       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
518
519
520
521perl v5.34.0                      2021-07-22         Mail::Box::MH::Message(3)
Impressum