diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-02-16 14:13:15 +0000 |
|---|---|---|
| committer | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2024-02-16 14:13:15 +0000 |
| commit | 886c3097531ed4a7b9fe310b81dfddb56aacf2a6 (patch) | |
| tree | 20384e323ec31c08db92444fed8e1697f92605bb /lib/bootstrap.php | |
| parent | 828fc4b4ade3d9ecc187b6636217487b7a8521ea (diff) | |
fixes #3658
Closes #3658
Merge request studip/studip!2616
Diffstat (limited to 'lib/bootstrap.php')
| -rw-r--r-- | lib/bootstrap.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bootstrap.php b/lib/bootstrap.php index e546d05..42c4f41 100644 --- a/lib/bootstrap.php +++ b/lib/bootstrap.php @@ -269,8 +269,8 @@ $mail_transporter_class = $mail_transporter_name . '_class'; $mail_transporter = new $mail_transporter_class; if ($mail_transporter_name == 'smtp_message') { include 'vendor/email_message/smtp.php'; - $mail_transporter->localhost = ($GLOBALS['MAIL_LOCALHOST'] == "") ? $_SERVER["SERVER_NAME"] : $GLOBALS['MAIL_LOCALHOST']; - $mail_transporter->smtp_host = ($GLOBALS['MAIL_HOST_NAME'] == "") ? $_SERVER["SERVER_NAME"] : $GLOBALS['MAIL_HOST_NAME']; + $mail_transporter->localhost = $GLOBALS['MAIL_LOCALHOST'] ?: $_SERVER['SERVER_NAME']; + $mail_transporter->smtp_host = $GLOBALS['MAIL_HOST_NAME'] ?: 'localhost'; if (is_array($GLOBALS['MAIL_SMTP_OPTIONS'])) { foreach ($GLOBALS['MAIL_SMTP_OPTIONS'] as $key => $value) { $mail_transporter->{"smtp_$key"} = $value; |
