User account expiration control panel for SME Server
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.
 
 

28 lines
934 B

{
use esmith::I18N;
use Locale::gettext;
use MIME::Lite;
my $i18n = new esmith::I18N;
$i18n->setLocale('lockAutoReply.tmpl');
my $fwd = ($props{EmailForward} =~ /^(forward|both)$/) ?
sprintf(gettext("Your mail has been forwarded to %s"), ($props{ForwardAddress} || 'devnull@' . $DomainName)) . ".\n" .
gettext("This forward is only temporary, you should update your addressbook.") : "";
my $msg = MIME::Lite->new(
Subject => gettext("This account is no longer valid"),
From => "\$USER@" . $DomainName,
Data => gettext("This is an automatic message in reply to your email with the following subject:") . "\n\n" .
'%S' . "\n\n" .
gettext("I'm sorry to inform you that the email address \$RECIPIENT is no longer valid.") . "\n" . $fwd
);
$msg->scrub([ 'Date' ]);
$msg->attr("content-type" => "text/plain");
$msg->attr("content-type.charset" => "utf-8");
$OUT = $msg->as_string;
}