push(@headers, [ $1, $2 ]);
}
elsif ($lines[$l] =~ /^\s+(.*)/) {
- $headers[$#headers]->[1] .= $1
+ $headers[$#headers]->[1] .= " ".$1
unless($#headers < 0);
}
$l++;
foreach $h (@headers) {
$attach->{'header'}->{lc($h->[0])} = $h->[1];
}
- if ($attach->{'header'}->{'content-type'} =~ /^([^;]+)/) {
+ if ($attach->{'header'}->{'content-type'} =~ /^([^;\s]+)/) {
$attach->{'type'} = lc($1);
}
else {
$mail->{'rawheaders'} .= $line."\n";
}
elsif ($line =~ /^\s+(.*)/) {
- $headers[$#headers]->[1] .= $1 unless($#headers < 0);
+ $headers[$#headers]->[1] .= " ".$1 unless($#headers < 0);
$mail->{'rawheaders'} .= $line."\n";
}
elsif ($line =~ /^From\s+(\S+).*\d+/ &&