From d0e102d0f7b2a7c8cb346996883c8d52f210c1fd Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 18 Jan 2016 19:19:09 +0100 Subject: [PATCH] Add templates for autoreply --- .../lock-auto-reply/message.txt/00Setup | 8 ++++++++ .../lock-auto-reply/message.txt/10Message | 19 +++++++++++++++++++ .../lock-auto-reply/message.txt/template-begin | 0 3 files changed, 27 insertions(+) create mode 100644 root/etc/e-smith/templates-user/lock-auto-reply/message.txt/00Setup create mode 100644 root/etc/e-smith/templates-user/lock-auto-reply/message.txt/10Message create mode 100644 root/etc/e-smith/templates-user/lock-auto-reply/message.txt/template-begin diff --git a/root/etc/e-smith/templates-user/lock-auto-reply/message.txt/00Setup b/root/etc/e-smith/templates-user/lock-auto-reply/message.txt/00Setup new file mode 100644 index 0000000..cecf35b --- /dev/null +++ b/root/etc/e-smith/templates-user/lock-auto-reply/message.txt/00Setup @@ -0,0 +1,8 @@ +{ + +use Locale::gettext; +use esmith::I18N; +my $i18n = new esmith::I18N; +$i18n->setLocale('expireAutoReply.tmpl'); + +} diff --git a/root/etc/e-smith/templates-user/lock-auto-reply/message.txt/10Message b/root/etc/e-smith/templates-user/lock-auto-reply/message.txt/10Message new file mode 100644 index 0000000..b1318f2 --- /dev/null +++ b/root/etc/e-smith/templates-user/lock-auto-reply/message.txt/10Message @@ -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 + +} diff --git a/root/etc/e-smith/templates-user/lock-auto-reply/message.txt/template-begin b/root/etc/e-smith/templates-user/lock-auto-reply/message.txt/template-begin new file mode 100644 index 0000000..e69de29