gw1500se has asked for the wisdom of the Perl Monks concerning the following question:
I think there is also a monkey wrench in here as the headers can wrap, according to the documentation. I think that means a single received header can wind up in 2 array items. That will be another can of worms but I will be happy for now just being able to parse the non-wrapped headers.#!/usr/bin/perl -w use strict; use Mail::Message; use Mail::Field; use Data::Dumper; my $msg=Mail::Message->read(\*STDIN); my $head=$msg->head(); my $from=$msg->from; my @to=$msg->to; my @subject=$msg->subject; my @recv=$head->get('received'); foreach my $recv_item (@recv) { # I need to create an array of hashes, each of which # contains a parsed 'received' header }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mail::Message and Mail::Field
by Anonymous Monk on Nov 13, 2008 at 15:46 UTC | |
|
Re: Mail::Message and Mail::Field
by Anonymous Monk on Nov 13, 2008 at 14:35 UTC | |
by gw1500se (Beadle) on Nov 13, 2008 at 15:05 UTC | |
by Anonymous Monk on Nov 13, 2008 at 15:31 UTC | |
by gw1500se (Beadle) on Nov 13, 2008 at 16:50 UTC | |
by Anonymous Monk on Nov 13, 2008 at 17:51 UTC | |
|