Using the BounceParser module

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm trying to use the BounceParser module
-DeliveryStatus-BounceParser-1.525/ to parse bounced messages and have a qu=
estion. Below is the synopsis of the module from CPAN. It appears that  $me=
ssage is a single bounced message, yet $bounce->addresses returns an array.=
 Shouldn't it return a single bounced address?

What I'm trying to do is this: Feed BounceParser a file that has a bunched =
of bounced messages and have it print a report of bounced addresses. What w=
ould be the best way to accomplish this? A code snippet would be highly app=

Many thanks for your help!




  use Mail::DeliveryStatus::BounceParser;

  # $message is \*io or $fh or "entire\nmessage" or \@lines
  my $bounce = eval { Mail::DeliveryStatus::BounceParser->new($message); =

  if ($@) {
    # couldn't parse.

  my @addresses       = $bounce->addresses;       # email address strings
  my @reports         = $bounce->reports;         # Mail::Header objects
  my $orig_message_id = $bounce->orig_message_id; # <ABCD.1234@mx.example=

  my $orig_message    = $bounce->orig_message;    # Mail::Internet object

Re: Using the BounceParser module

No responses? If you have any suggestions, please post. Thanks very much!

Site Timeline