From: justauser Date: Wed, 29 May 2013 20:23:04 +0000 (-0400) Subject: added a personalized email template. if the file: X-Git-Tag: 1.8~47^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f766373271b4d388597f95ef2a55d028fcbca8f1;p=tt-rss.git added a personalized email template. if the file: my_email_article_template.txt exists it will be used, otherwise the default will be used --- diff --git a/plugins/mail/init.php b/plugins/mail/init.php index 5b61c235..3b158208 100644 --- a/plugins/mail/init.php +++ b/plugins/mail/init.php @@ -50,7 +50,10 @@ class Mail extends Plugin { $tpl = new MiniTemplator; $tpl_t = new MiniTemplator; - $tpl->readTemplateFromFile("templates/email_article_template.txt"); + $templ_name = "templates/email_article_template.txt"; + if(file_exists("templates/my_email_article_template.txt")) + $templ_name = "templates/my_email_article_template.txt"; + $tpl->readTemplateFromFile($templ_name); $tpl->setVariable('USER_NAME', $_SESSION["name"], true); $tpl->setVariable('USER_EMAIL', $user_email, true);