pluckyshucker has asked for the wisdom of the Perl Monks concerning the following question:

I've been tinkering with Mail::DeliveryStatus::BounceParser and, well, it's just not working the way it's supposed to. Does anyone have some complete code examples of this module's use? I am using in the following manner:
use Mail::POP3Client; use Mail::DeliveryStatus::BounceParser; my $pop = new Mail::POP3Client( USER => "undeliverables", PASSWORD => "password", HOST => "the.freekin.host"); for( $i = 1; $i <= $pop->Count(); $i++){ print $pop->Count()."\n"; $bounce = Mail::DeliveryStatus::BounceParser->new( $pop->HeadA +ndBody($i) ); if ($@) { print "Could not parse message\n"; }else{ if($bounce->is_bounce()){ print $pop->HeadAndBody($i); print $bounce->orig_message_id."\n"; print scalar $bounce->addresses; } } } $pop->Close();
This will output the head and body of the incoming message and '0' for zero adresses... i can't figure out why its not pulling anything into the new bounce object... Am I doing something obviously wrong? If you have a better way to handle bounced emails let me know!

Replies are listed 'Best First'.
Re: Mail::DeliveryStatus::BounceParser
by pluckyshucker (Initiate) on Sep 26, 2003 at 13:39 UTC
    So I am thinking that maybe Mail::POP3Client->HeadAndBody is not returning the whole bounce... Any Ideas... Anyone? I have to fetch the mail with a pop client so i can't use STDIN as someone has suggested to me. Any help is greatly appreciated. ~j