From bb984cedaa3530ccc88c4c1f7ca84ebbfbc52d89 Mon Sep 17 00:00:00 2001
From: Daniel Steglich <steglich@datasystems24.de>
Date: Fri, 15 Jan 2016 08:06:37 -0500
Subject: [PATCH] Allow domain specific welcom messages:
---
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