diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 83aa25e25f..376b98f338 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -597,7 +597,7 @@ class messenger $this->from = $board_contact; } - $encode_eol = ($config['smtp_delivery']) ? "\r\n" : PHP_EOL; + $encode_eol = $config['smtp_delivery'] || PHP_VERSION_ID >= 80000 ? "\r\n" : PHP_EOL; // Build to, cc and bcc strings $to = $cc = $bcc = ''; @@ -629,7 +629,7 @@ class messenger } else { - $result = phpbb_mail($mail_to, $this->subject, $this->msg, $headers, PHP_EOL, $err_msg); + $result = phpbb_mail($mail_to, $this->subject, $this->msg, $headers, $encode_eol, $err_msg); } if (!$result) @@ -950,7 +950,8 @@ class queue } else { - $result = phpbb_mail($to, $subject, $msg, $headers, PHP_EOL, $err_msg); + $encode_eol = $config['smtp_delivery'] || PHP_VERSION_ID >= 80000 ? "\r\n" : PHP_EOL; + $result = phpbb_mail($to, $subject, $msg, $headers, $encode_eol, $err_msg); } if (!$result)