NAME

Maildir::Reader - Easily read the contents of a Maildir folder

SYNOPSIS

use strict;
use warnings;
use Maildir::Reader;

my $helper = Maildir::Reader->new( path => "~/Maildir/.foo.com/" );

my @all = $helper->all();
my @new = $helper->unread();
my @read = $helper->read();

AUTHOR

Steve Kemp <steve@steve.org.uk>

COPYRIGHT AND LICENSE

Copyright (C) 2010 Steve Kemp <steve@steve.org.uk>.

This library is free software. You can modify and or distribute it under the same terms as Perl itself.

METHODS

new

The constructor. There is only a single mandatory argument which is the path to the folder you'll be working with:

my $helper = Maildir::Reader->new( maildir => "/home/steve/Maildir/.foo/" );

list

Return a hashref containing entries for each message.

A typical return value would include:

[ {
    'flags' => 'seen',
    'fullpath' => '/home/skx/Maildir/.Amazon.co.uk/cur/1279058791.20642_2.skx.xen-hosting.net:2,S',
    'size' => 7840
  }, ]

all

Return the filenames of each message in the Maildir folder, regardless of whether they are read or unread.

The files will be returned in date-sorted order, with the oldest files being shown first.

unread

Return the filenames of unread message in the Maildir folder.

The files will be returned in date-sorted order, with the oldest files being shown first.

read

Return the filenames of all read messages in the Maildir folder.

The files will be returned in date-sorted order, with the oldest files being shown first.