diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index caec01aa2565ee2f4590440f3bb91664b672f369..20388a4c0fcd73298972c88411cc76e1401e7fe3 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -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');