Fix warning

This commit is contained in:
Laurent Destailleur 2020-11-30 12:03:04 +01:00
parent 7634212811
commit 4f2259ea38

View File

@ -171,7 +171,7 @@ class CMailFile
if (!empty($this->sendcontext)) {
$smtpContextKey = strtoupper($this->sendcontext);
$keyForSMTPSendMode = 'MAIN_MAIL_SENDMODE_'.$smtpContextKey;
$smtpContextSendMode = $conf->global->{$keyForSMTPSendMode};
$smtpContextSendMode = empty($conf->global->{$keyForSMTPSendMode}) ? '' : $conf->global->{$keyForSMTPSendMode};
if (!empty($smtpContextSendMode) && $smtpContextSendMode != 'default') {
$this->sendmode = $smtpContextSendMode;
}