The Mail::Header library apparently returns CC, never Cc.
This commit is contained in:
parent
cdcf26f8fa
commit
347e0d3113
1 changed files with 4 additions and 3 deletions
|
@ -136,12 +136,13 @@ sub ProcessMailDir($$$) {
|
|||
my $upiFull = NextUPI();
|
||||
my $header = new Mail::Header($msgFH);
|
||||
my $fields = $header->header_hashref;
|
||||
my %parsed = (FromName => '', ToName => '', FromAddr => "", ToAddr => "", CcName => '', CcAddr => '', 'Subject' => '',
|
||||
my %parsed = (FromName => '', ToName => '', FromAddr => "", ToAddr => "", CCName => '', CCAddr => '', 'Subject' => '',
|
||||
Date => '');
|
||||
foreach my $fieldName (qw/From To Cc Subject Date/) {
|
||||
use Data::Dumper;
|
||||
foreach my $fieldName (qw/From To CC Subject Date/) {
|
||||
foreach my $item (@{$fields->{$fieldName}}) {
|
||||
chomp $item;
|
||||
if ($fieldName =~ /From|To|Cc/) {
|
||||
if ($fieldName =~ /From|To|CC/) {
|
||||
my $addr = Email::Address::XS->parse($item);
|
||||
if ($addr->name ne "") {
|
||||
$parsed{"${fieldName}Name"} .= "; " if $parsed{"${fieldName}Name"} !~ /^\s*$/;
|
||||
|
|
Loading…
Reference in a new issue