[sf-perl] handling email messages in Perl
mehryar
mehryar at mehryar.com
Tue Jul 18 11:08:32 PDT 2006
Hi folks,
Im trying to read and write back out mail messages in Perl.
I know Simon Cozens started the Email::* project to get away from the
Mail::* bloat. But Im having a little mental block here.
Im trying to read and write back out a mail folder like so:
use Email::Folder;
my $folder = Email::Folder->new("test_folder");
my @messages = $folder->messages;
print "Weee! I got ", scalar @messages," email messages\n";
now I'd like to write these messages back out to a file so that I can
re-read it again using the above code. And I can't seem to be able to do
it. Basically I can't figure out how to write the message back into a
"folder" type file that Email::Folder will be able to read again.
I've tried a few ways Email::LocalDelivery, plain writing it out, but Im
just missing something.
thanks,
-mehryar
More information about the SanFrancisco-pm
mailing list