| 1 | # $Id: Send.pm 1179 2003-07-13 15:13:22Z richardc $ | ||||||||||
| 2 | package Siesta::Plugin::Send; | ||||||||||
| 3 | 9 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 9 | ▶ | use Siesta::Plugin; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 9 | ▶ | use base 'Siesta::Plugin'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | sub description { | ||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 8 | 1 | "dispatch mail to list members"; | |||||||||
| 9 | } | ||||||||||
| 10 | |||||||||||
| 11 | 2 | ▶ | sub process { | ||||||||
|
Subroutine
process: called CC=5 SCAR=17.5
Pod
documented
| |||||||||||
| 12 | 2 | my $self = shift; | |||||||||
| 13 | 2 | my $mail = shift; | |||||||||
| 14 | |||||||||||
| 15 | 2 | my $list = $self->list; | |||||||||
| 16 | 2 | USER: for my $user ($list->members) { | |||||||||
| 17 | 1 | ▶ | next if $user->nomail; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | 1 | my $message = $mail->clone; | |||||||||
| 20 | |||||||||||
| 21 | 1 | for my $plugin (grep { $_->personal } $list->plugins) { | |||||||||
| 22 | 0 | $plugin->member($user); | |||||||||
| 23 | 0 | ▶ | next USER if $plugin->process($message); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | } | ||||||||||
| 25 | 1 | Siesta->sender->send( $message, | |||||||||
| 26 | to => $user->email, | ||||||||||
| 27 | from => $list->return_path, | ||||||||||
| 28 | ); | ||||||||||
| 29 | } | ||||||||||
| 30 | 2 | return; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 9 | 1; | |||||||||