Changeset 181 for trunk/lib/Vote/DB/Poll.pm
- Timestamp:
- 04/11/09 02:39:36 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Vote/DB/Poll.pm
r176 r181 6 6 use warnings; 7 7 use Vote; 8 use Mail::Mailer;9 8 use Crypt::RSA; 10 9 use Crypt::RSA::Key::Public::SSH; … … 446 445 } 447 446 448 sub mail_ballot_confirm {449 my ($self, $vid, $info) = @_;450 my $voteinfo = $self->info or return;451 $info->{ballotid} or return;452 my $mailer = new Mail::Mailer 'smtp', Server => (Vote->config->{smtp} || 'localhost');453 $ENV{MAILADDRESS} = $vid;454 $mailer->open({455 From => $vid, # TODO allow to configure this456 To => $vid,457 Subject => 'Confirmation de vote: ' . $voteinfo->{label},458 Vote::DB::common::mail_header(),459 });460 print $mailer <<EOF;461 462 Vous venez de participer au vote:463 464 --------465 $voteinfo->{label}466 --------467 468 Votre bulletin est idéntifié sous le numéro:469 $info->{ballotid}470 471 Les résultats seront disponibles à cet url:472 $info->{url}473 474 Cordialement.475 EOF476 $mailer->close477 or warn "couldn't send whole message: $!\n";478 479 }480 481 447 sub voting_count { 482 448 my ($self) = @_;
Note: See TracChangeset
for help on using the changeset viewer.