develooper Front page | perl.pep | Postings from May 2010

Re: Email::Folder stuck at first message

Thread Previous
From:
Ricardo Signes
Date:
May 4, 2010 05:40
Subject:
Re: Email::Folder stuck at first message
Message ID:
20100504124020.GB3417@cancer.codesimply.com
* Eddie Rowe <webmaster@tarheeloesrescue.org> [2010-04-14T11:41:45]
> I have tried to process messages from a Mozilla Thunderbid INBOX file.

Sorry it took me a month to reply.

> [code]
>  use Email::Folder;
> 
>  my $folder = Email::Folder->new("c:/users/eddie/desktop/INBOX.txt");
> 
>  while( my $message = $folder->next_message ) {
>      print join "\n", map { $_->header('Date') } $message;
> }
> [/code]

I don't know what format Thunderbird stores stuff in.  Email::Folder guesses
based on the filename, and I don't know what it will guess here.  Probably
stupidly.

Is it mbox format?  Are you *sure*?  If so, use Email::Folder::Mbox directly.

-- 
rjbs

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About