From a538a12118bb484b658c40ecb73882bb8a2002a1 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Sun, 31 Jan 2016 06:39:50 -0500
Subject: [PATCH] Fixed: FS#3933 - Invalid sendmail "from" in php_fpm_pool.conf.master
---
server/plugins-available/mail_plugin.inc.php | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php
index caec01a..20388a4 100644
--- a/server/plugins-available/mail_plugin.inc.php
+++ b/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');
--
Gitblit v1.9.1