Changeset 786


Ignore:
Timestamp:
02/02/10 20:42:21 (14 years ago)
Author:
nanardon
Message:
  • update expiration mail format according demand
  • add english version in mail and the real date
Location:
LATMOS-Accounts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts/Maintenance.pm

    r785 r786  
    3434    my @users; 
    3535    while (my $res = $sth->fetchrow_hashref) { 
    36         $res->{delay} =~ s/(day.?) .*/$1/; 
     36        $res->{delay} =~ s/day.? .*//; 
    3737        $res->{obj} = $base->get_object('user', $res->{name}); 
    3838        push(@users, $res); 
     
    8484        my %mail = ( 
    8585            From => $self->val('_default_', 'mailFrom', 'nomail@localhost'), 
    86             Subject => 'LATMOS Expire in ' . $user->{delay}, 
     86            Subject => 'LATMOS Expire in ' . $user->{delay} . 'days', 
    8787            smtp => $self->val('_default_', 'smtp'), 
    8888            'Content-Type' => 'text/plain; charset=utf-8', 
     
    113113        }; 
    114114        my $mailcc = join(', ', @cc) || ''; 
    115         push(@summary, sprintf("%-15s %-10s %s\n  CC: %s\n", 
    116                 $user->{obj}->id, 
    117                 $user->{delay}, 
     115        push(@summary, sprintf("%s : %s : %s\n", 
     116                $user->{obj}->queryformat('%{displayName} : %{name} : %{department} : %{managerContact} : %{expireText}'), 
    118117                $to || 'Not sent, no destination', 
    119                 ($mailcc ? "  $mailcc\n" : ''), 
     118                ($mailcc ? $mailcc : ''), 
    120119            ) 
    121120        ); 
  • LATMOS-Accounts/templates/mail/account_expire.mail

    r709 r786  
     1(English version follows) 
     2 
    13Bonjour [% obj.get_c_field('displayName') %], 
    24 
    35sauf erreur ou ommission de notre part votre compte [% obj.id %] expire 
    4 dans [% delay %]. 
     6dans [% delay %] jours ([% obj.get_c_field('expire') %]). 
    57En aucun cas vos fichiers ne seront détruit  
    68 
     
    1012Cordialement. 
    1113L'équipe d'administration. 
     14 
     15=== 
     16 
     17Hello [% obj.get_c_field('displayName') %], 
     18 
     19unless error or omission on our part, your account login expires 
     20in [% delay %] days ([% obj.get_c_field('expire') %]). 
     21In no case files will be destroyed. 
     22 
     23If it had to be extended, please ask your manager to contact 
     24svp@latmos.ipsl.fr to give us with the new date of expiry. 
     25 
     26Best regards. 
     27The administration team. 
Note: See TracChangeset for help on using the changeset viewer.