From: Tim Düsterhus Date: Tue, 14 Jun 2016 21:19:20 +0000 (+0200) Subject: Properly support MAIL_USE_F_PARAM in new API X-Git-Tag: 3.0.0_Beta_1~1444 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bb54a04a0165b0ada65ee1f74bc64f647ae8a962;p=GitHub%2FWoltLab%2FWCF.git Properly support MAIL_USE_F_PARAM in new API --- diff --git a/wcfsetup/install/files/lib/system/email/transport/PhpEmailTransport.class.php b/wcfsetup/install/files/lib/system/email/transport/PhpEmailTransport.class.php index 2713f8730f..2f649ffd11 100644 --- a/wcfsetup/install/files/lib/system/email/transport/PhpEmailTransport.class.php +++ b/wcfsetup/install/files/lib/system/email/transport/PhpEmailTransport.class.php @@ -40,6 +40,11 @@ class PhpEmailTransport implements EmailTransport { return implode(': ', $item); }, $headers)); - mail($envelopeTo->getAddress(), $email->getSubject(), StringUtil::unifyNewlines($email->getBodyString()), $headers, '-f'.$email->getSender()->getAddress()); + if (MAIL_USE_F_PARAM) { + mail($envelopeTo->getAddress(), $email->getSubject(), StringUtil::unifyNewlines($email->getBodyString()), $headers, '-f'.$email->getSender()->getAddress()); + } + else { + mail($envelopeTo->getAddress(), $email->getSubject(), StringUtil::unifyNewlines($email->getBodyString()), $headers); + } } }