55 |
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); |
56 |
for (@field_type_Structured) |
for (@field_type_Structured) |
57 |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Structured'} |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Structured'} |
58 |
my @field_type_Address = qw(approved bcc cc delivered-to envelope-to |
my @field_type_Address = qw(approved bcc cc delivered-to disposition-notification-to |
59 |
|
envelope-to |
60 |
errors-to fcc from mail-followup-to mail-followup-cc mail-from reply-to resent-bcc |
errors-to fcc from mail-followup-to mail-followup-cc mail-from reply-to resent-bcc |
61 |
resent-cc resent-to resent-from resent-sender return-path |
resent-cc resent-to resent-from resent-sender return-path |
62 |
return-receipt-to sender to x-approved x-beenthere |
return-receipt-to sender to x-approved x-beenthere |
74 |
{$DEFAULT{field_type}->{$_} = 'Message::Field::MsgID'} |
{$DEFAULT{field_type}->{$_} = 'Message::Field::MsgID'} |
75 |
for (qw(received x-received)) |
for (qw(received x-received)) |
76 |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Received'} |
{$DEFAULT{field_type}->{$_} = 'Message::Field::Received'} |
77 |
|
$DEFAULT{field_type}->{'content-type'} = 'Message::Field::ContentType'; |
78 |
|
$DEFAULT{field_type}->{'content-disposition'} = 'Message::Field::ContentDisposition'; |
79 |
|
for (qw(x-face-type)) |
80 |
|
{$DEFAULT{field_type}->{$_} = 'Message::Field::ValueParams'} |
81 |
for (qw(accept accept-charset accept-encoding accept-language |
for (qw(accept accept-charset accept-encoding accept-language |
82 |
content-disposition content-language |
content-language |
83 |
content-transfer-encoding content-type encrypted followup-to keywords newsgroups |
content-transfer-encoding encrypted followup-to keywords newsgroups |
84 |
x-brother x-daughter x-face-type x-respect x-moe |
x-brother x-daughter x-respect x-moe x-syster x-wife)) |
|
x-syster x-wife)) |
|
85 |
{$DEFAULT{field_type}->{$_} = 'Message::Field::CSV'} |
{$DEFAULT{field_type}->{$_} = 'Message::Field::CSV'} |
86 |
my @field_type_URI = qw(list-archive list-help list-owner |
my @field_type_URI = qw(list-archive list-help list-owner |
87 |
list-post list-subscribe list-unsubscribe uri url x-home-page x-http_referer |
list-post list-subscribe list-unsubscribe uri url x-home-page x-http_referer |
220 |
|
|
221 |
=cut |
=cut |
222 |
|
|
223 |
sub add ($$$) { |
sub add ($$$;%) { |
224 |
my $self = shift; |
my $self = shift; |
225 |
my ($name, $body) = (lc shift, shift); |
my ($name, $body) = (lc shift, shift); |
226 |
|
my %option = @_; |
227 |
return 0 if $name =~ /$REG{UNSAFE_field_name}/; |
return 0 if $name =~ /$REG{UNSAFE_field_name}/; |
228 |
$body = $self->_field_body ($body, $name); |
$body = $self->_field_body ($body, $name); |
229 |
push @{$self->{field}}, {name => $name, body => $body}; |
if ($option{prepend}) { |
230 |
|
unshift @{$self->{field}}, {name => $name, body => $body}; |
231 |
|
} else { |
232 |
|
push @{$self->{field}}, {name => $name, body => $body}; |
233 |
|
} |
234 |
$body; |
$body; |
235 |
} |
} |
236 |
|
|
251 |
for my $field (@{$self->{field}}) { |
for my $field (@{$self->{field}}) { |
252 |
if ($field->{name} eq $name) { |
if ($field->{name} eq $name) { |
253 |
$field->{body} = $body; |
$field->{body} = $body; |
254 |
return $self; |
return $body; |
255 |
} |
} |
256 |
} |
} |
257 |
push @{$self->{field}}, {name => $name, body => $body}; |
push @{$self->{field}}, {name => $name, body => $body}; |