Ignore:
Timestamp:
04/11/09 02:39:36 (15 years ago)
Author:
nanardon
Message:
  • ballot confirm now use template
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Vote/DB/Poll.pm

    r176 r181  
    66use warnings; 
    77use Vote; 
    8 use Mail::Mailer; 
    98use Crypt::RSA; 
    109use Crypt::RSA::Key::Public::SSH; 
     
    446445} 
    447446 
    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 this 
    456         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 EOF 
    476     $mailer->close 
    477         or warn "couldn't send whole message: $!\n"; 
    478  
    479 } 
    480  
    481447sub voting_count { 
    482448    my ($self) = @_; 
Note: See TracChangeset for help on using the changeset viewer.