64 |
$self->{option}->{value_type}->{body_part}->[1]->{-format} |
$self->{option}->{value_type}->{body_part}->[1]->{-format} |
65 |
= |
= |
66 |
my @ilist = qw/accept_coderange body_default_charset body_default_charset_input cte_default text_coderange/; |
my @ilist = qw/accept_coderange body_default_charset body_default_charset_input cte_default text_coderange/; |
67 |
$self->{option}->{value_type}->{preamble} = ['Message::Body::TextPlain', |
$self->{option}->{value_type}->{preamble} = sub { |
68 |
{-media_type => 'text', -media_subtype => '/multipart-preamble'}, |
my $phdr = new Message::Header -format => 'mail-rfc822'; |
69 |
\@ilist]; |
my $ct = ''; |
70 |
|
$ct = $self->{header}->field ('content-type', -new_item_unless_exist => 0) if ref $self->{header}; |
71 |
|
$ct = $ct->item ('x-preamble-type', -new_item_unless_exist => 0) if ref $ct; |
72 |
|
$phdr->add ('content-type' => $ct) if $ct; |
73 |
|
['Message::Body::TextPlain', |
74 |
|
{-media_type => 'text', -media_subtype => '/multipart-preamble', |
75 |
|
entity_header => $phdr}, |
76 |
|
\@ilist]}; |
77 |
$self->{option}->{value_type}->{body_part} = sub {['Message::Entity', |
$self->{option}->{value_type}->{body_part} = sub {['Message::Entity', |
78 |
{-format => $_[0]->{option}->{format} . '/' . 'mime-entity', |
{-format => $_[0]->{option}->{format} . '/' . 'mime-entity', |
79 |
-body_default_media_type => $_[0]->{option}->{default_media_type}, |
-body_default_media_type => $_[0]->{option}->{default_media_type}, |
80 |
-body_default_media_subtype => $_[0]->{option}->{default_media_subtype}}, |
-body_default_media_subtype => $_[0]->{option}->{default_media_subtype}}, |
81 |
\@ilist]}; |
\@ilist]}; |
82 |
$self->{option}->{value_type}->{epilogue} = ['Message::Body::TextPlain', |
$self->{option}->{value_type}->{epilogue} = sub { |
83 |
{-media_type => 'text', -media_subtype => '/multipart-epilogue'}, |
my $phdr = new Message::Header -format => 'mail-rfc822'; |
84 |
\@ilist]; |
my $ct = ''; |
85 |
|
$ct = $self->{header}->field ('content-type', -new_item_unless_exist => 0) if ref $self->{header}; |
86 |
|
$ct = $ct->item ('x-epilogue-type', -new_item_unless_exist => 0) if ref $ct; |
87 |
|
$phdr->add ('content-type' => $ct) if $ct; |
88 |
|
['Message::Body::TextPlain', |
89 |
|
{-media_type => 'text', -media_subtype => '/multipart-epilogue', |
90 |
|
entity_header => $phdr}, |
91 |
|
\@ilist]}; |
92 |
|
|
93 |
$self->{boundary} = $option{boundary}; |
$self->{boundary} = $option{boundary}; |
94 |
if (!length $self->{boundary} && ref $self->{header}) { |
if (!length $self->{boundary} && ref $self->{header}) { |
95 |
my $ct = $self->{header}->field ('content-type', -new_item_unless_exist => 0); |
my $ct = $self->{header}->field ('content-type', -new_item_unless_exist => 0); |
96 |
$self->{boundary} = $ct->parameter ('boundary') if ref $ct; |
$self->{boundary} = $ct->parameter ('boundary', -new_item_unless_exist => 0) |
97 |
|
if ref $ct; |
98 |
} |
} |
99 |
|
|
100 |
my $mst = $self->{option}->{media_subtype}; |
my $mst = $self->{option}->{media_subtype}; |