Add templates for autoreply

This commit is contained in:
Daniel Berteaud 2016-01-18 19:19:09 +01:00
parent 1b5388eae4
commit d0e102d0f7
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,8 @@
{
use Locale::gettext;
use esmith::I18N;
my $i18n = new esmith::I18N;
$i18n->setLocale('expireAutoReply.tmpl');
}

View File

@ -0,0 +1,19 @@
{
use Mime::Lite;
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" .
"%S" .
gettext("I'm sorry to inform you that the email address \$RECIPIENT is no longer valid") .
($props{EmailForward} =~ /^(forward|both)$/) ? sprintf(gettext("Your mail has been forwarded to %s"), $props{ForwardAddress}) .
gettext("This forward is only temporary, you should update your addressbook") : "";
);
$msg->attr("content-type" => "text/plain");
$msg->attr("content-type.charset" => "utf-8");
$OUT = $msg->as_string
}