49 |
fold_length => 70, |
fold_length => 70, |
50 |
field_type => {':DEFAULT' => 'Message::Field::Unstructured'}, |
field_type => {':DEFAULT' => 'Message::Field::Unstructured'}, |
51 |
mail_from => -1, |
mail_from => -1, |
52 |
|
output_bcc => -1, |
53 |
parse_all => -1, |
parse_all => -1, |
54 |
); |
); |
55 |
my @field_type_Structured = qw(cancel-lock |
my @field_type_Structured = qw(cancel-lock |
56 |
importance mime-version path precedence user-agent x-cite |
importance mime-version path precedence x-cite |
57 |
x-face x-mail-count x-msmail-priority x-priority x-uidl xref); |
x-face x-mail-count x-msmail-priority x-priority x-uidl xref); |
58 |
for (@field_type_Structured) |
for (@field_type_Structured) |
59 |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Structured'} |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Structured'} |
92 |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Structured'} |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Structured'} |
93 |
for (qw(list-id)) |
for (qw(list-id)) |
94 |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Structured'} |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Structured'} |
95 |
for (qw(content-description subject title x-nsubject)) |
for (qw(subject title x-nsubject)) |
96 |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Subject'} |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Subject'} |
97 |
|
for (qw(list-software user-agent server)) |
98 |
|
{$DEFAULT{field_type}->{$_} = 'Message::Field::UA'} |
99 |
|
|
100 |
=head2 Message::Header->new ([%option]) |
=head2 Message::Header->new ([%option]) |
101 |
|
|
341 |
my @ret; |
my @ret; |
342 |
$OPT{capitalize} ||= $self->{option}->{capitalize}; |
$OPT{capitalize} ||= $self->{option}->{capitalize}; |
343 |
$OPT{mail_from} ||= $self->{option}->{mail_from}; |
$OPT{mail_from} ||= $self->{option}->{mail_from}; |
344 |
|
$OPT{output_bcc} ||= $self->{option}->{output_bcc}; |
345 |
push @ret, 'From '.$self->field ('mail-from') if $OPT{mail_from}>0; |
push @ret, 'From '.$self->field ('mail-from') if $OPT{mail_from}>0; |
346 |
for my $field (@{$self->{field}}) { |
for my $field (@{$self->{field}}) { |
347 |
my $name = $field->{name}; |
my $name = $field->{name}; |
348 |
next unless $field->{name}; |
next unless $name; |
349 |
next if $OPT{mail_from}<0 && $name eq 'mail-from'; |
next if $OPT{mail_from}<0 && $name eq 'mail-from'; |
350 |
|
next if $OPT{output_bcc}<0 && ($name eq 'bcc' || $name eq 'resent-bcc'); |
351 |
my $fbody = scalar $field->{body}; |
my $fbody = scalar $field->{body}; |
352 |
next unless $fbody; |
next unless $fbody; |
353 |
$fbody =~ s/\x0D([^\x09\x0A\x20])/\x0D\x20$1/g; |
$fbody =~ s/\x0D([^\x09\x0A\x20])/\x0D\x20$1/g; |