raflach has asked for the wisdom of the Perl Monks concerning the following question:
So I'm downloading the mail from a pop3 box using:
Pretty much straight from the POP3 docs. Now I want to use Mail::Box::MH to save the retrieved messages to an MH style folder. So I add:use Net::POP3; my $pop = Net::POP3->new('www.myhost.com', Timeout => 90); if ($pop->login('listaddress+myhost.com','pass') > 0) { my $msgnums = $pop->list; foreach my $msgnum (keys %$msgnums) { my $msg = $pop->get($msgnum); } } $pop->quit;
at the top, and then in the loop I put:use Mail::Box::MH; my $folder = new Mail::Box::MH folder => '/mypath/myspecialmailboxfold +er';
which fails because addMessage must recieve a message object. So I search diligently for a (prefab) way to construct a message object from the plaintext that is returned from the POP3 get call because I know that I'm not competent enough to handle parsing all the possible (standard and non-standard) MIME and non-MIME headers and bodies for myself. I have had no luck. Can anyone point me in the right direction?my $MHmsg = join "",@$msg; $folder->addMessage($MHmsg);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Creating mail::message from retrieved text
by monsieur_champs (Curate) on Apr 29, 2005 at 15:43 UTC | |
Re: Creating mail::message from retrieved text
by redlemon (Hermit) on Feb 08, 2005 at 19:50 UTC | |
by raflach (Pilgrim) on Feb 08, 2005 at 20:32 UTC |
Back to
Seekers of Perl Wisdom