1Mail::Box::Maildir::MesUssaegre(C3o)ntributed Perl DocumMeanitla:t:iBoonx::Maildir::Message(3)
2
3
4

NAME

6       Mail::Box::Maildir::Message - one message in a Maildir folder
7

INHERITANCE

9        Mail::Box::Maildir::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::Maildir ...
17        my $message = $folder->message(10);
18

DESCRIPTION

20       A "Mail::Box::Maildir::Message" represents one message in an
21       Mail::Box::Maildir folder. Each message is stored in a separate file.
22
23       Extends "DESCRIPTION" in Mail::Box::Dir::Message.
24

METHODS

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

DETAILS

399       Extends "DETAILS" in Mail::Box::Dir::Message.
400
401   Structure of a Message
402       Extends "Structure of a Message" in Mail::Box::Dir::Message.
403
404   Message object implementation
405       Extends "Message object implementation" in Mail::Box::Dir::Message.
406
407   Message class implementation
408       Extends "Message class implementation" in Mail::Box::Dir::Message.
409
410   Labels
411       Extends "Labels" in Mail::Box::Dir::Message.
412
413       Predefined labels
414
415       Extends "Predefined labels" in Mail::Box::Dir::Message.
416
417       Status and X-Status fields
418
419       Extends "Status and X-Status fields" in Mail::Box::Dir::Message.
420
421       Flags in filename
422
423       When new messages arrive on system and have to be stored in a maildir
424       folder, they are put in the "new" sub-directory of the folder (first
425       created in the "tmp" sub-directory and then immediately moved to
426       "new").  The following information was found at
427       <http://cr.yp.to/proto/maildir.html>.
428
429       Each message is written in a separate file.  The filename is
430       constructed from the time-of-arrival, a hostname, an unique component,
431       a syntax marker, and flags. For example "1014220791.meteor.42:2,DF".
432       The filename must match:
433
434        my ($time, $unique, $hostname, $info)
435           = $filename =~ m!^(\d+)\.(.*)\.(\w+)(\:.*)?$!;
436        my ($semantics, $flags)
437           = $info =~ m!([12])\,([DFPRST]*)$!;
438        my @flags = split //, $flags;
439
440       When an application opens the folder, there may be messages in "new"
441       which are new arival, and messages in "cur".  The latter are labeled
442       "accepted".  To move a message from "new" to "cur", you have two
443       options with the same effect:
444
445         $msg->accept;
446         $msg->label(accept => 1);
447
448       See accept(), label(), Mail::Box::Maildir::new(accept_new), and
449       Mail::Box::Maildir::acceptMessages()
450
451       The messages are moved, and their name is immediately extended with
452       flags.  An example:
453
454        new/897979431.meteor.42      may become
455        cur/897979431.meteor.42:2,FS
456
457       The added characters ':2,' refer to the "second state of processing",
458       where the message has been inspected.  And the characters (which should
459       be in alphabetic order) mean
460
461        D      => draft
462        F      => flagged
463        R      => replied  (answered)
464        S      => seen
465        T      => deleted  (tagged for deletion)
466
467       Some maildir clients support
468        P      => passed   (resent/forwarded/bounced to someone else)
469
470       The flags will immediately change when label() or delete() is used,
471       which differs from other message implementations: maildir is stateless,
472       and should not break when applications crash.
473

DIAGNOSTICS

475       Error: Cannot coerce a $class object into a $class object
476       Error: Cannot create parser for $filename.
477           For some reason (the previous message have told you already) it was
478           not possible to create a message parser for the specified filename.
479
480       Error: Cannot include forward source as $include.
481           Unknown alternative for the forward(include).  Valid choices are
482           "NO", "INLINE", "ATTACH", and "ENCAPSULATE".
483
484       Error: Cannot include reply source as $include.
485           Unknown alternative for the "include" option of reply().  Valid
486           choices are "NO", "INLINE", and "ATTACH".
487
488       Error: Cannot write message to $filename: $!
489           When a modified or new message is written to disk, it is first
490           written to a temporary file in the folder directory.  For some
491           reason, it is impossible to create this file.
492
493       Error: Failed to move $new to $filename: $!
494           When a modified or new message is written to disk, it is first
495           written to a temporary file in the folder directory.  Then, the new
496           file is moved to replace the existing file.  Apparently, the latter
497           fails.
498
499       Error: Method bounce requires To, Cc, or Bcc
500           The message bounce() method forwards a received message off to
501           someone else without modification; you must specified it's new
502           destination.  If you have the urge not to specify any destination,
503           you probably are looking for reply(). When you wish to modify the
504           content, use forward().
505
506       Error: Method forwardAttach requires a preamble
507       Error: Method forwardEncapsulate requires a preamble
508       Error: No address to create forwarded to.
509           If a forward message is created, a destination address must be
510           specified.
511
512       Error: No default mailer found to send message.
513           The message send() mechanism had not enough information to
514           automatically find a mail transfer agent to sent this message.
515           Specify a mailer explicitly using the "via" options.
516
517       Error: No rebuild rule $name defined.
518       Error: Only build() Mail::Message's; they are not in a folder yet
519           You may wish to construct a message to be stored in a some kind of
520           folder, but you need to do that in two steps.  First, create a
521           normal Mail::Message, and then add it to the folder.  During this
522           Mail::Box::addMessage() process, the message will get coerce()-d
523           into the right message type, adding storage information and the
524           like.
525
526       Error: Package $package does not implement $method.
527           Fatal error: the specific package (or one of its superclasses) does
528           not implement this method where it should. This message means that
529           some other related classes do implement this method however the
530           class at hand does not.  Probably you should investigate this and
531           probably inform the author of the package.
532
533       Error: Unable to read delayed body.
534           For some reason, the header of the message could be read, but the
535           body cannot.  Probably the file has disappeared or the permissions
536           were changed during the progress of the program.
537
538       Error: Unable to read delayed head.
539           Mail::Box tries to be lazy with respect to parsing messages.  When
540           a directory organized folder is opened, only the filenames of
541           messages are collected.  At first use, the messages are read from
542           their file.  Apperently, a message is used for the first time here,
543           but has disappeared or is unreadible for some other reason.
544
545       Error: coercion starts with some object
546

SEE ALSO

548       This module is part of Mail-Box distribution version 3.007, built on
549       May 03, 2019. Website: http://perl.overmeer.net/CPAN/
550

LICENSE

552       Copyrights 2001-2019 by [Mark Overmeer]. For other contributors see
553       ChangeLog.
554
555       This program is free software; you can redistribute it and/or modify it
556       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
557
558
559
560perl v5.30.0                      2019-07-26    Mail::Box::Maildir::Message(3)
Impressum