- for (my $m=0; $m<scalar(@$H); $m++) {
- if (index($$H[$m], 'From:')==0) {
- $from = $$H[$m];
- $m++;
- while (exists($$H[$m]) && $$H[$m] =~ /^\s/)
- { $from .= $$H[$m]; $m++; }
- last;
+ if ($pgpshort) {
+ for (my $m=0; $m<scalar(@$H); $m++) {
+ if (index($$H[$m], 'From:')==0) {
+ $from = $$H[$m];
+ $m++;
+ while (exists($$H[$m]) && $$H[$m] =~ /^\s/)
+ { $from .= $$H[$m]; $m++; }
+ last;
+ }
+ }
+ if (defined($from)) {
+ ($from) =
+ $from=~m/(\w[\w.+-]*@(?:[\w.+-]+\.)+[A-Za-z]{2,})/;