Daniel Steglich
2016-01-15 bb984cedaa3530ccc88c4c1f7ca84ebbfbc52d89
Allow domain specific welcom messages:

* In addition to language specific custom welcome messages (when creating a new mail account) this patch will
allow to have a welcome message template for each domain.

* To add a domain specific welcome message, place a file at /usr/local/ispconfig/server/conf-custom/mail/
and name it according the domain, like welcome_email_example.com.txt

* i.e. /usr/local/ispconfig/server/conf-custom/mail/welcome_email_example.com.txt

will be used if a mailbox for example.com is created.
1 files modified
5 ■■■■ changed files
server/plugins-available/mail_plugin.inc.php 5 ●●●● patch | view | raw | blame | history
server/plugins-available/mail_plugin.inc.php
@@ -206,7 +206,10 @@
        }
        //* Send the welcome email message
        if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) {
        $domain = explode('@', $data["new"]["email"])[1];
        if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) {
            $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt');
        } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) {
            $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt');
        } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt')) {
            $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt');