aboutsummaryrefslogtreecommitdiff
path: root/lib/bootstrap.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-02-16 14:13:15 +0000
committerJan-Hendrik Willms <tleilax+github@gmail.com>2024-02-27 10:05:13 +0100
commit3baffddc2e2ec2c9ca2f136e507d0d62e83a53ba (patch)
treee1e2a2f8c61a07ec149506badcbf091c8401a0e9 /lib/bootstrap.php
parent416cfcb6ccf30676c45bfbea054c06c7f363c860 (diff)
fixes #3658
Closes #3658 Merge request studip/studip!2616
Diffstat (limited to 'lib/bootstrap.php')
-rw-r--r--lib/bootstrap.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bootstrap.php b/lib/bootstrap.php
index 59bfa7f..a91f9a8 100644
--- a/lib/bootstrap.php
+++ b/lib/bootstrap.php
@@ -272,8 +272,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;