diff --git a/src/backend/imap/Mail/mail.php b/src/backend/imap/Mail/mail.php index 60cc3d8b..f1bf80a6 100644 --- a/src/backend/imap/Mail/mail.php +++ b/src/backend/imap/Mail/mail.php @@ -91,10 +91,12 @@ public function __construct($params = null) /* Because the mail() function may pass headers as command * line arguments, we can't guarantee the use of the standard * "\r\n" separator. Instead, we use the system's native line - * separator. */ - if (defined('PHP_EOL')) { + * separator. + * Fixed in PHP 8.0. + */ + if (defined('PHP_EOL') && version_compare(PHP_VERSION, '8.0.0', '<')) { $this->sep = PHP_EOL; - } else { + } elseif (version_compare(PHP_VERSION, '8.0.0', '<')) { $this->sep = (strpos(PHP_OS, 'WIN') === false) ? "\n" : "\r\n"; } }