Skip to content
Snippets Groups Projects
Commit 6cc90d34 authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch 'domain_specific_welcome_message' into 'stable-3.1'

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.

See merge request !263
parents ba59737e bb984ced
No related branches found
No related tags found
No related merge requests found
......@@ -206,7 +206,10 @@ class mail_plugin {
}
//* 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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment