line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Send.pm 1179 2003-07-13 15:13:22Z richardc $ |
2
|
|
|
|
|
|
|
package Siesta::Plugin::Send; |
3
|
6
|
|
|
6
|
|
2099
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
254
|
|
4
|
6
|
|
|
6
|
|
82
|
use Siesta::Plugin; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
55
|
|
5
|
6
|
|
|
6
|
|
217
|
use base 'Siesta::Plugin'; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
1868
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub description { |
8
|
1
|
|
|
1
|
0
|
409
|
"dispatch mail to list members"; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub process { |
12
|
2
|
|
|
2
|
1
|
6
|
my $self = shift; |
13
|
2
|
|
|
|
|
8
|
my $mail = shift; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
33
|
my $list = $self->list; |
16
|
2
|
|
|
|
|
143
|
USER: for my $user ($list->members) { |
17
|
1
|
50
|
|
|
|
1991
|
next if $user->nomail; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
843
|
my $message = $mail->clone; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
43
|
for my $plugin (grep { $_->personal } $list->plugins) { |
|
2
|
|
|
|
|
800
|
|
22
|
0
|
|
|
|
|
0
|
$plugin->member($user); |
23
|
0
|
0
|
|
|
|
0
|
next USER if $plugin->process($message); |
24
|
|
|
|
|
|
|
} |
25
|
1
|
|
|
|
|
54
|
Siesta->sender->send( $message, |
26
|
|
|
|
|
|
|
to => $user->email, |
27
|
|
|
|
|
|
|
from => $list->return_path, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
} |
30
|
2
|
|
|
|
|
1183
|
return; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |