Skip to content

Commit da1a0f8

Browse files
committed
Update mail_plugin.inc.php.
Change check order for welcome-email template. First it should use specific welcome messages for the domain (html before text) and than language specific templates. Otherwise it would use a german html language file before a domain specific text file if html file does not exist.
1 parent cdc9434 commit da1a0f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/plugins-available/mail_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,11 @@ function user_insert($event_name, $data) {
213213
if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html')) {
214214
$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html');
215215
$html = true;
216+
} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) {
217+
$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt');
216218
} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html')) {
217219
$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html');
218220
$html = true;
219-
} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) {
220-
$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt');
221221
} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) {
222222
$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt');
223223
} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt')) {

0 commit comments

Comments
 (0)