Changeset 77


Ignore:
Timestamp:
03/18/09 21:42:49 (15 years ago)
Author:
nanardon
Message:
  • use a correct from in mail
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Vote/Model/Vote.pm

    r76 r77  
    763763    $upd_voting->execute($encpasswd, $id); 
    764764 
     765    my $date = $voteinfo->{dstart} && $voteinfo->{dend} 
     766        ? sprintf("\n" . 'Vous pourrez voter entre le %s %s et le %s %s' . "\n", 
     767            $voteinfo->{dstart}, $voteinfo->{hstart}, $voteinfo->{dend}, $voteinfo->{hend}) 
     768        : ''; 
     769 
    765770    # TODO complete this properly: 
    766771    my $mailer = new Mail::Mailer 'smtp', Server => 'mailhost'; 
    767772    $mailer->open({ 
    768         From => 'Voting system <nomail@nomail.com>', 
     773        From => $voteinfo->{owner}, 
    769774        To => $vinfo->{mail}, 
    770         Subject => 'Vote passwd', 
     775        Subject => 'Invitation a voter: ' . $voteinfo->{label}, 
     776        'X-Epoll-poll' => $id, 
     777        'X-Epoll-version' => $Vote::VERSION, 
    771778    }); 
    772779    print $mailer <<EOF; 
     
    777784 
    778785$mailinfo->{voteurl} 
    779  
     786$date 
    780787Votre identifiant est: $vinfo->{mail} 
    781788Votre mot de passe est: $passwd 
     789 
     790Conserver precieusement ces identifiants, il ne vous seront pas redonner. 
    782791 
    783792Cordialement. 
     
    847856    my $mailer = new Mail::Mailer 'smtp', Server => 'mailhost'; 
    848857    $mailer->open({ 
    849         From => 'Voting system <nomail@nomail.com>', 
     858        From => 'Voting system <nomail@nomail.com>', # TODO allow to configure this 
    850859        To => $info{mail}, 
    851860        Subject => 'Votre nouveau vote', 
Note: See TracChangeset for help on using the changeset viewer.