in reply to Re: finding unread emails in IMAP maildir
in thread finding unread emails in IMAP maildir

Yes, you're right about Email::Simple being too simple. I really didn't want to rewrite the whole thing, but I guess it's good practice.
I'll take a look at the Mail::Box suite of modules and see how hard it would be to intregrate.
Thanks for your help,
chrisj
  • Comment on Re^2: finding unread emails in IMAP maildir

Replies are listed 'Best First'.
Re^3: finding unread emails in IMAP maildir
by xdg (Monsignor) on Aug 08, 2005 at 21:48 UTC

    One nice feature about Mail::Box is that it tries to make things as consistent as possible across backends. So, for example, $message->label( 'seen' ) is the same whether you're using Maildirs or IMAP, even though the way the two signal seen vs. unseen messages is very different. Shifting my example above to an IMAP routine instead of a Maildir routine probably only requires changing the way in which you call $manager->open( ... ) to include the right parameters for an IMAP type folder (server, user, password, etc.). (Assuming everything else is supported in the new type of folder, of course.)

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      awesome. Thanks.
      I'll give this a try asap
      Thanks again,
      chrisj