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

Email::Folder stuck at first message

Thread Next
Eddie Rowe
April 14, 2010 08:42
Email::Folder stuck at first message
Message ID:
I have tried to process messages from a Mozilla Thunderbid INBOX file.

  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;

the INBOX file was copied from my Thunderbird profile data and renamed.  
This above code should spit out dates of all emails in the inbox, but it 
stops after one message.  Am I doing something wrong to prevent the 
processing of the entire file?

Eddie Rowe

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About