You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
967 B
26 lines
967 B
{
|
|
use esmith::I18N;
|
|
use Locale::gettext;
|
|
|
|
my $i18n = new esmith::I18N;
|
|
$i18n->setLocale('adminNotifNextExpirations.tmpl');
|
|
|
|
my $domain = $conf->get_value("DomainName") || "localhost";
|
|
my $systemName = $conf->get_value("SystemName") || "SME Server";
|
|
|
|
$OUT .= "To: ".gettext("System Administrator")." <admin\@${domain}>\n";
|
|
$OUT .= "From: \"".
|
|
gettext("Account Expiration Notifier").
|
|
"\" <do-not-reply\@${domain}>\n";
|
|
$OUT .= "Subject: ".
|
|
gettext("One or more user accounts will expire soon").
|
|
"\n";
|
|
$OUT .= "Content-Type: text/plain; charset='utf-8'\n";
|
|
$OUT .= "Content-Transfer-Encoding: 8bit\n";
|
|
|
|
$OUT .= gettext("The following user accounts will expire soon:\n\n");
|
|
|
|
foreach my $u (sort keys %$users){
|
|
$OUT .= " * " . sprintf(gettext("%s will expire in %d days"), "$users->{$u}->{name} ($u)", $users->{$u}->{remaining}) . "\n";
|
|
}
|
|
}
|
|
|