line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Egg::View::Mail::Plugin::Signature; |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Id: Signature.pm 332 2008-04-19 17:03:10Z lushe $ |
6
|
|
|
|
|
|
|
# |
7
|
2
|
|
|
2
|
|
915
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
76
|
|
8
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
450
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.06'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub __get_mailbody { |
13
|
0
|
|
|
0
|
|
|
my($self, $data)= @_; |
14
|
0
|
0
|
|
|
|
|
return $self->next::method($data) unless $data->{body}; |
15
|
0
|
|
|
|
|
|
my $body= $data->{body}= $self->__init_mailbody($data); |
16
|
0
|
0
|
|
|
|
|
$$body = $data->{body_header}. $$body if $data->{body_header}; |
17
|
0
|
0
|
|
|
|
|
$$body.= "\n$data->{body_footer}" if $data->{body_footer}; |
18
|
0
|
0
|
|
|
|
|
$$body.= "\n$data->{signature}" if $data->{signature}; |
19
|
0
|
|
|
|
|
|
$self->next::method($data); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 NAME |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Egg::View::Mail::Plugin::Signature - Famous etc. are added to the content of the transmission of mail. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 SYNOPSIS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
package MyApp::View::Mail::MyComp; |
33
|
|
|
|
|
|
|
use base qw/ Egg::View::Mail::Base /; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
........... |
36
|
|
|
|
|
|
|
..... |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__PACKAGE__->setup_plugin('Signature'); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
It is MAIL plugin to add famous etc. to the content when mail is transmitted. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
When 'Signature' is passed to 'setup_plugin' method, it is built in. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
There is a thing that processing the same as the aim is not done by the competition |
47
|
|
|
|
|
|
|
with other plugins. Please adjust the built-in order. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__PACKAGE__->setup_plugin(qw/ |
50
|
|
|
|
|
|
|
Signature |
51
|
|
|
|
|
|
|
EmbAgent |
52
|
|
|
|
|
|
|
/); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
When the following items are set by the argument and the configuration of 'send' |
55
|
|
|
|
|
|
|
method, the content is added to the content of mail. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head3 body_header |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Text added to uppermost part of content of mail. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
$mail->send( ...... , body_header => $header_text ); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head3 body_footer |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Text added under content of mail. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
$mail->send( ...... , body_footer => $footer_text ); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head3 signature |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Text added the under content of mail. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
$mail->send( ...... , signature => $signature_text ); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 SEE ALSO |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
L<Egg::Release>, |
78
|
|
|
|
|
|
|
L<Egg::View::Mail>, |
79
|
|
|
|
|
|
|
L<Egg::View::Mail::Base>, |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 AUTHOR |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Copyright (C) 2008 Bee Flag, Corp. E<lt>L<http://egg.bomcity.com/>E<gt>, All Rights Reserved. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
90
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.6 or, |
91
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |
94
|
|
|
|
|
|
|
|