From bb54a04a0165b0ada65ee1f74bc64f647ae8a962 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 14 Jun 2016 23:19:20 +0200 Subject: [PATCH] Properly support MAIL_USE_F_PARAM in new API --- .../lib/system/email/transport/PhpEmailTransport.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); + } } } -- 2.20.1