1Mail::Box::File::MessagUes(e3r)Contributed Perl DocumentMaatiilo:n:Box::File::Message(3)
2
3
4

NAME

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

INHERITANCE

9        Mail::Box::File::Message
10          is a Mail::Box::Message
11          is a Mail::Message
12          is a Mail::Reporter
13
14        Mail::Box::File::Message is extended by
15          Mail::Box::Dbx::Message
16          Mail::Box::Mbox::Message
17

SYNOPSIS

19        my $folder  = new Mail::Box::File folder => $ENV{MAIL}, ...;
20        my $message = $folder->message(0);
21

DESCRIPTION

23       Maintain one message in an file based folder, any Mail::Box::File
24       extension.
25

METHODS

27   Constructors
28       $obj->clone(OPTIONS)
29           See "Constructors" in Mail::Message
30
31       Mail::Box::File::Message->new(OPTIONS)
32           Messages in file-based folders use the following options for
33           creation:
34
35            -Option    --Defined in     --Default
36             body        Mail::Message    undef
37             body_type   Mail::Box::Message  <from folder>
38             deleted     Mail::Message    <false>
39             field_type  Mail::Message    undef
40             folder      Mail::Box::Message  <required>
41             from_line                    undef
42             head        Mail::Message    undef
43             head_type   Mail::Message    Mail::Message::Head::Complete
44             labels      Mail::Message    {}
45             log         Mail::Reporter   'WARNINGS'
46             messageId   Mail::Message    undef
47             modified    Mail::Message    <false>
48             size        Mail::Box::Message  undef
49             trace       Mail::Reporter   'WARNINGS'
50             trusted     Mail::Message    <false>
51
52           body => OBJECT
53           body_type => CODE|CLASS
54           deleted => BOOLEAN
55           field_type => CLASS
56           folder => FOLDER
57           from_line => STRING
58             The line which begins each message in the file. Some people
59             detest this line, but this is just how things were invented...
60
61           head => OBJECT
62           head_type => CLASS
63           labels => ARRAY|HASH
64           log => LEVEL
65           messageId => STRING
66           modified => BOOLEAN
67           size => INTEGER
68           trace => LEVEL
69           trusted => BOOLEAN
70
71   Constructing a message
72       $obj->bounce([RG-OBJECT|OPTIONS])
73           See "Constructing a message" in Mail::Message::Construct::Bounce
74
75       Mail::Box::File::Message->build([MESSAGE|PART|BODY], CONTENT)
76           See "Constructing a message" in Mail::Message::Construct::Build
77
78       Mail::Box::File::Message->buildFromBody(BODY, [HEAD], HEADERS)
79           See "Constructing a message" in Mail::Message::Construct::Build
80
81       $obj->forward(OPTIONS)
82           See "Constructing a message" in Mail::Message::Construct::Forward
83
84       $obj->forwardAttach(OPTIONS)
85           See "Constructing a message" in Mail::Message::Construct::Forward
86
87       $obj->forwardEncapsulate(OPTIONS)
88           See "Constructing a message" in Mail::Message::Construct::Forward
89
90       $obj->forwardInline(OPTIONS)
91           See "Constructing a message" in Mail::Message::Construct::Forward
92
93       $obj->forwardNo(OPTIONS)
94           See "Constructing a message" in Mail::Message::Construct::Forward
95
96       $obj->forwardPostlude
97           See "Constructing a message" in Mail::Message::Construct::Forward
98
99       $obj->forwardPrelude
100           See "Constructing a message" in Mail::Message::Construct::Forward
101
102       $obj->forwardSubject(STRING)
103           See "Constructing a message" in Mail::Message::Construct::Forward
104
105       Mail::Box::File::Message->read(FILEHANDLE|SCALAR|REF-SCALAR|ARRAY-OF-LINES,
106       OPTIONS)
107           See "Constructing a message" in Mail::Message::Construct::Read
108
109       $obj->rebuild(OPTIONS)
110           See "Constructing a message" in Mail::Message::Construct::Rebuild
111
112       $obj->reply(OPTIONS)
113           See "Constructing a message" in Mail::Message::Construct::Reply
114
115       $obj->replyPrelude([STRING|FIELD|ADDRESS|ARRAY-OF-THINGS])
116           See "Constructing a message" in Mail::Message::Construct::Reply
117
118       $obj->replySubject(STRING)
119           Mail::Box::File::Message->replySubject(STRING)
120
121           See "Constructing a message" in Mail::Message::Construct::Reply
122
123   The message
124       $obj->container
125           See "The message" in Mail::Message
126
127       $obj->copyTo(FOLDER, OPTIONS)
128           See "The message" in Mail::Box::Message
129
130       $obj->escapedBody
131           Mbox folders contain multiple messages in one file, using a
132           separator line to keep them apart.  Typically, these lines start
133           with "From ".  Lines within the message could interfere with this
134           separator, and should therefore be translated.
135
136           This method will return the escaped text of the body as reference.
137
138       $obj->folder([FOLDER])
139           See "The message" in Mail::Box::Message
140
141       $obj->fromLine([LINE])
142           Many people detest file-style folders because they store messages
143           all in one file, where a line starting with "From " leads the
144           header.  If we receive a message from a file-based folder, we store
145           that line.  If we write to such a file, but there is no such line
146           stored, then we try to generate one.
147
148           If LINE is provided, then the starting line is set to this value.
149
150       $obj->isDummy
151           See "The message" in Mail::Message
152
153       $obj->isPart
154           See "The message" in Mail::Message
155
156       $obj->messageId
157           See "The message" in Mail::Message
158
159       $obj->moveTo(FOLDER, OPTIONS)
160           See "The message" in Mail::Box::Message
161
162       $obj->print([FILEHANDLE])
163           See "The message" in Mail::Message
164
165       $obj->send([MAILER], OPTIONS)
166           See "The message" in Mail::Message
167
168       $obj->seqnr([INTEGER])
169           See "The message" in Mail::Box::Message
170
171       $obj->size
172           See "The message" in Mail::Message
173
174       $obj->toplevel
175           See "The message" in Mail::Message
176
177       $obj->write([FILEHANDLE])
178           Write one message to a file handle.  It is the message including
179           the leading 'From ' line and trailing blank.  The From-line may
180           interfere with lines in the body: those lines are escaped with an
181           extra '>'.
182
183           example:
184
185            $msg->write(\*FILE);    # print the message with encaps to FILE
186            $msg->write;            # message with encaps to selected filehandle
187            $msg->print(\*FILE);    # the message without encaps.
188
189   The header
190       $obj->bcc
191           See "The header" in Mail::Message
192
193       $obj->cc
194           See "The header" in Mail::Message
195
196       $obj->date
197           See "The header" in Mail::Message
198
199       $obj->destinations
200           See "The header" in Mail::Message
201
202       $obj->from
203           See "The header" in Mail::Message
204
205       $obj->get(FIELDNAME)
206           See "The header" in Mail::Message
207
208       $obj->guessTimestamp
209           See "The header" in Mail::Message
210
211       $obj->head([HEAD])
212           See "The header" in Mail::Message
213
214       $obj->nrLines
215           See "The header" in Mail::Message
216
217       $obj->sender
218           See "The header" in Mail::Message
219
220       $obj->study(FIELDNAME)
221           See "The header" in Mail::Message
222
223       $obj->subject
224           See "The header" in Mail::Message
225
226       $obj->timestamp
227           See "The header" in Mail::Message
228
229       $obj->to
230           See "The header" in Mail::Message
231
232   The body
233       $obj->body([BODY])
234           See "The body" in Mail::Message
235
236       $obj->contentType
237           See "The body" in Mail::Message
238
239       $obj->decoded(OPTIONS)
240           See "The body" in Mail::Message
241
242       $obj->encode(OPTIONS)
243           See "The body" in Mail::Message
244
245       $obj->isMultipart
246           See "The body" in Mail::Message
247
248       $obj->isNested
249           See "The body" in Mail::Message
250
251       $obj->parts(['ALL'|'ACTIVE'|'DELETED'|'RECURSE'|FILTER])
252           See "The body" in Mail::Message
253
254   Flags
255       $obj->delete
256           See "Flags" in Mail::Message
257
258       $obj->deleted([BOOLEAN])
259           See "Flags" in Mail::Message
260
261       $obj->isDeleted
262           See "Flags" in Mail::Message
263
264       $obj->isModified
265           See "Flags" in Mail::Message
266
267       $obj->label(LABEL|PAIRS)
268           See "Flags" in Mail::Message
269
270       $obj->labels
271           See "Flags" in Mail::Message
272
273       $obj->labelsToStatus
274           See "Flags" in Mail::Message
275
276       $obj->modified([BOOLEAN])
277           See "Flags" in Mail::Message
278
279       $obj->statusToLabels
280           See "Flags" in Mail::Message
281
282   The whole message as text
283       $obj->file
284           See "The whole message as text" in Mail::Message::Construct::Text
285
286       $obj->lines
287           See "The whole message as text" in Mail::Message::Construct::Text
288
289       $obj->printStructure([FILEHANDLE|undef],[INDENT])
290           See "The whole message as text" in Mail::Message::Construct::Text
291
292       $obj->string
293           See "The whole message as text" in Mail::Message::Construct::Text
294
295   Internals
296       $obj->clonedFrom
297           See "Internals" in Mail::Message
298
299       Mail::Box::File::Message->coerce(MESSAGE, OPTIONS)
300           See "Internals" in Mail::Message
301
302       $obj->diskDelete
303           See "Internals" in Mail::Box::Message
304
305       $obj->fileLocation
306           Returns the location of the whole message including the from-line.
307           In LIST context, both begin and end are returned.  In SCALAR
308           context, only the begin is passed back.
309
310       $obj->isDelayed
311           See "Internals" in Mail::Message
312
313       $obj->loadBody
314       $obj->moveLocation(DISTANCE)
315           The message is relocated in the file, being moved over DISTANCE
316           bytes.  Setting a new location will update the according
317           information in the header and body.
318
319       $obj->readBody(PARSER, HEAD [, BODYTYPE])
320           See "Internals" in Mail::Box::Message
321
322       $obj->readFromParser(PARSER)
323           Read one message from a Mail::Box::File based folder, including the
324           leading message separator.
325
326       $obj->readHead(PARSER [,CLASS])
327           See "Internals" in Mail::Message
328
329       $obj->recursiveRebuildPart(PART, OPTIONS)
330           See "Internals" in Mail::Message::Construct::Rebuild
331
332       $obj->storeBody(BODY)
333           See "Internals" in Mail::Message
334
335       $obj->takeMessageId([STRING])
336           See "Internals" in Mail::Message
337
338   Error handling
339       $obj->AUTOLOAD
340           See "METHODS" in Mail::Message::Construct
341
342       $obj->addReport(OBJECT)
343           See "Error handling" in Mail::Reporter
344
345       $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
346           Mail::Box::File::Message->defaultTrace([LEVEL]|[LOGLEVEL,
347           TRACELEVEL]|[LEVEL, CALLBACK])
348
349           See "Error handling" in Mail::Reporter
350
351       $obj->errors
352           See "Error handling" in Mail::Reporter
353
354       $obj->log([LEVEL [,STRINGS]])
355           Mail::Box::File::Message->log([LEVEL [,STRINGS]])
356
357           See "Error handling" in Mail::Reporter
358
359       $obj->logPriority(LEVEL)
360           Mail::Box::File::Message->logPriority(LEVEL)
361
362           See "Error handling" in Mail::Reporter
363
364       $obj->logSettings
365           See "Error handling" in Mail::Reporter
366
367       $obj->notImplemented
368           See "Error handling" in Mail::Reporter
369
370       $obj->report([LEVEL])
371           See "Error handling" in Mail::Reporter
372
373       $obj->reportAll([LEVEL])
374           See "Error handling" in Mail::Reporter
375
376       $obj->shortSize([VALUE])
377           Mail::Box::File::Message->shortSize([VALUE])
378
379           See "Error handling" in Mail::Message
380
381       $obj->shortString
382           See "Error handling" in Mail::Message
383
384       $obj->trace([LEVEL])
385           See "Error handling" in Mail::Reporter
386
387       $obj->warnings
388           See "Error handling" in Mail::Reporter
389
390   Cleanup
391       $obj->DESTROY
392           See "Cleanup" in Mail::Message
393
394       $obj->destruct
395           See "Cleanup" in Mail::Box::Message
396
397       $obj->inGlobalDestruction
398           See "Cleanup" in Mail::Reporter
399

DIAGNOSTICS

401       Error: Cannot coerce a $class object into a $class object
402       Error: Cannot include forward source as $include.
403           Unknown alternative for the forward(include).  Valid choices are
404           "NO", "INLINE", "ATTACH", and "ENCAPSULATE".
405
406       Error: Cannot include reply source as $include.
407           Unknown alternative for the "include" option of reply().  Valid
408           choices are "NO", "INLINE", and "ATTACH".
409
410       Error: Method bounce requires To, Cc, or Bcc
411           The message bounce() method forwards a received message off to
412           someone else without modification; you must specified it's new
413           destination.  If you have the urge not to specify any destination,
414           you probably are looking for reply(). When you wish to modify the
415           content, use forward().
416
417       Error: Method forwardAttach requires a preamble
418       Error: Method forwardEncapsulate requires a preamble
419       Error: No address to create forwarded to.
420           If a forward message is created, a destination address must be
421           specified.
422
423       Error: No default mailer found to send message.
424           The message send() mechanism had not enough information to
425           automatically find a mail transfer agent to sent this message.
426           Specify a mailer explicitly using the "via" options.
427
428       Error: No rebuild rule $name defined.
429       Error: Only build() Mail::Message's; they are not in a folder yet
430           You may wish to construct a message to be stored in a some kind of
431           folder, but you need to do that in two steps.  First, create a
432           normal Mail::Message, and then add it to the folder.  During this
433           Mail::Box::addMessage() process, the message will get coerce()-d
434           into the right message type, adding storage information and the
435           like.
436
437       Error: Package $package does not implement $method.
438           Fatal error: the specific package (or one of its superclasses) does
439           not implement this method where it should. This message means that
440           some other related classes do implement this method however the
441           class at hand does not.  Probably you should investigate this and
442           probably inform the author of the package.
443
444       Error: Unable to read delayed body.
445       Error: coercion starts with some object
446

SEE ALSO

448       This module is part of Mail-Box distribution version 2.097, built on
449       January 26, 2011. Website: http://perl.overmeer.net/mailbox/
450

LICENSE

452       Copyrights 2001-2011 by Mark Overmeer. For other contributors see
453       ChangeLog.
454
455       This program is free software; you can redistribute it and/or modify it
456       under the same terms as Perl itself.  See
457       http://www.perl.com/perl/misc/Artistic.html
458
459
460
461perl v5.12.3                      2011-01-26       Mail::Box::File::Message(3)
Impressum