| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Egg::View::Mail::Encode::ISO2022JP; |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# $Id: ISO2022JP.pm 285 2008-02-28 04:20:55Z lushe $ |
|
6
|
|
|
|
|
|
|
# |
|
7
|
2
|
|
|
2
|
|
727
|
use strict; |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
103
|
|
|
8
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
50
|
|
|
9
|
2
|
|
|
2
|
|
1795
|
use Jcode; |
|
|
2
|
|
|
|
|
103049
|
|
|
|
2
|
|
|
|
|
1046
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub __get_mailbody { |
|
14
|
0
|
|
|
0
|
|
|
my($self, $data)= @_; |
|
15
|
0
|
|
|
|
|
|
my $body= $self->next::method($data); |
|
16
|
0
|
|
0
|
|
|
|
my $j= $self->{jcode_context} ||= Jcode->new('jcode'); |
|
17
|
0
|
|
|
|
|
|
$data->{subject}= $j->set(\$data->{subject})->mime_encode; |
|
18
|
0
|
|
0
|
|
|
|
my $headers= $data->{headers} ||= {}; |
|
19
|
0
|
|
|
|
|
|
$headers->{Encoding}= '7bit'; |
|
20
|
0
|
|
|
|
|
|
$headers->{Charset} = 'ISO-2022-JP'; |
|
21
|
0
|
|
|
|
|
|
\$j->set($body)->iso_2022_jp; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Egg::View::Mail::Encode::ISO2022JP - Processing for Japanese mail is done. |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
package MyApp::View::Mail::MyComp; |
|
35
|
|
|
|
|
|
|
use base qw/ Egg::View::Mail::Base /; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
........... |
|
38
|
|
|
|
|
|
|
..... |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__PACKAGE__->setup_mailer( SMTP => qw/ |
|
41
|
|
|
|
|
|
|
Encode::ISO2022JP |
|
42
|
|
|
|
|
|
|
MIME::Entity |
|
43
|
|
|
|
|
|
|
/); |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Processing necessary to send Japanese mail is done. |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Please use use with L<Egg::View::Mail::MIME::Entity>. |
|
50
|
|
|
|
|
|
|
It is a code matched to the specification of this component. |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
L<Egg::Release>, |
|
55
|
|
|
|
|
|
|
L<Egg::View::Mail>, |
|
56
|
|
|
|
|
|
|
L<Egg::View::Mail::Base>, |
|
57
|
|
|
|
|
|
|
L<Egg::View::Mail::MIME::Entity>, |
|
58
|
|
|
|
|
|
|
L<Jcode>, |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Copyright (C) 2008 Bee Flag, Corp. E<lt>L<http://egg.bomcity.com/>E<gt>, All Rights Reserved. |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
|
69
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.6 or, |
|
70
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
|
73
|
|
|
|
|
|
|
|