- Issue created by @SuneK
- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 5:18am 14 November 2023 - last update
about 1 year ago 2,163 pass - 🇮🇳India viren18febS
Hi @SuneK
I have added a patch for this , please review.
Thanks - Status changed to Needs work
12 months ago 10:09pm 20 November 2023 - 🇸🇰Slovakia poker10
Thanks for working on this. The same condition is used in
mail.inc
:define('MAIL_LINE_ENDINGS', isset($_SERVER['WINDIR']) || (isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Win32') !== FALSE) ? "\r\n" : "\n");
Which is related to this: 🐛 [D7] PhpMail : broken mail headers in PHP 8.0+ because of LF characters Needs work . If we are going to change, we need to synchronize both issues, or change it here for both places.
------------
I think the condition is not correct:
+++ b/modules/system/system.mail.inc - if (!isset($_SERVER['WINDIR']) && (!isset($_SERVER['SERVER_SOFTWARE']) || strpos($_SERVER['SERVER_SOFTWARE'], 'Win32') === FALSE)) { + if (stripos(PHP_OS, 'WIN') === FALSE) {
Because it will return FALSE even for
Darwin
,CYGWIN_NT-5.1
, ... See the list of possible values: https://stackoverflow.com/questions/738823/possible-values-for-php-osWe should probably check something like this (it is already used in core):
substr(PHP_OS, 0, 3) != 'WIN'
or
!(stripos(PHP_OS, 'WIN') === 0);
- First commit to issue fork.
- Merge request !5490Issue #3401412: Ensure mail function detects Windows - D7. → (Open) created by ankithashetty
- last update
12 months ago 2,163 pass - Status changed to Needs review
12 months ago 7:30am 21 November 2023 - 🇮🇳India ankithashetty Karnataka, India
- last update
11 months ago 2,166 pass