E
ebg005
Hi,
To read SMTP message header fields of multiple messages (in Maildir),
I have a foreach loop which is doing subsequent calls to the sub
routine below. The first call is OK and returns the from and the to
field in a hash (called by reference), but successive calls to the
same readHeader routine returns me no values into my hash and gives no
error.
sub readHeader ($$) {
my ( $headRef, $msgFile ) = @_;
# get header fields
my $head = MIME::Head->from_file ( $msgFile );
$headRef->{from} = lc $head->get ( 'From' );
$headRef->{to} = lc $head->get ( 'To' );
}
I'm using the MIME-tools-5.425.
All ideas are welcome.
Thanks
To read SMTP message header fields of multiple messages (in Maildir),
I have a foreach loop which is doing subsequent calls to the sub
routine below. The first call is OK and returns the from and the to
field in a hash (called by reference), but successive calls to the
same readHeader routine returns me no values into my hash and gives no
error.
sub readHeader ($$) {
my ( $headRef, $msgFile ) = @_;
# get header fields
my $head = MIME::Head->from_file ( $msgFile );
$headRef->{from} = lc $head->get ( 'From' );
$headRef->{to} = lc $head->get ( 'To' );
}
I'm using the MIME-tools-5.425.
All ideas are welcome.
Thanks