|
0 |
NAME
|
|
1 |
Email::Folder - read all the messages from a folder as Email::Simple
|
|
2 |
objects.
|
|
3 |
|
|
4 |
SYNOPSIS
|
|
5 |
use Email::Folder;
|
|
6 |
|
|
7 |
my $folder = Email::Folder->new("some_file");
|
|
8 |
|
|
9 |
print join "\n", map { $_->header("Subject") } $folder->messages;
|
|
10 |
|
|
11 |
METHODS
|
|
12 |
new($folder, %options)
|
|
13 |
Takes the name of a folder, and a hash of options
|
|
14 |
|
|
15 |
If a 'reader' option is passed in then that is used as the class to read
|
|
16 |
in messages with.
|
|
17 |
|
|
18 |
messages
|
|
19 |
Returns a list containing all of the messages in the folder. Can only be
|
|
20 |
called once as it drains the iterator.
|
|
21 |
|
|
22 |
next_message
|
|
23 |
acts as an iterator. reads the next message from a folder. returns false
|
|
24 |
at the end of the folder
|
|
25 |
|
|
26 |
bless_message($message)
|
|
27 |
Takes a raw RFC822 message and blesses it into a class.
|
|
28 |
|
|
29 |
By default this is an Email::Simple object but can easily be overriden
|
|
30 |
in a subclass.
|
|
31 |
|
|
32 |
For example, this simple subclass just returns the raw rfc822 messages,
|
|
33 |
and exposes the speed of the parser.
|
|
34 |
|
|
35 |
package Email::RawFolder;
|
|
36 |
use base 'Email::Folder';
|
|
37 |
sub bless_message { $_[1] };
|
|
38 |
1;
|
|
39 |
|
|
40 |
reader
|
|
41 |
read-only accessor to the underlying Email::Reader subclass instance
|
|
42 |
|
|
43 |
AUTHORS
|
|
44 |
Simon Wistow <simon@thegestalt.org>
|
|
45 |
|
|
46 |
Richard Clamp <richardc@unixbeard.net>
|
|
47 |
|
|
48 |
COPYING
|
|
49 |
Copyright 2006, Simon Wistow
|
|
50 |
|
|
51 |
Distributed under the same terms as Perl itself.
|
|
52 |
|
|
53 |
This software is under no warranty and will probably ruin your life,
|
|
54 |
kill your friends, burn your house and bring about the doobie brothers.
|
|
55 |
|
|
56 |
SUPPORT
|
|
57 |
This module is part of the Perl Email Project - http://pep.kwiki.org/
|
|
58 |
|
|
59 |
There is a mailing list at pep@perl.org (subscribe at
|
|
60 |
pep-subscribe@perl.org) and an archive available at
|
|
61 |
http://nntp.perl.org/group/pep.php
|
|
62 |
|
|
63 |
SEE ALSO
|
|
64 |
Email::LocalDelivery, Email::FolderType, Email::Simple
|
|
65 |
|