From aa4631642be0483790c438532bd1ef72c4302b5b Mon Sep 17 00:00:00 2001 From: cloudseeder Date: Wed, 3 May 2023 08:57:01 -0700 Subject: [PATCH 1/3] Update Sendmail.php Remove the \r\n translation for mail headers per the PHP mail() page. additional_headers (optional) ---------- String or array to be inserted at the end of the email header. This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n). If outside data are used to compose this header, the data should be sanitized so that no unwanted headers could be injected. Signed-off-by: cloudseeder --- src/Transport/Sendmail.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Transport/Sendmail.php b/src/Transport/Sendmail.php index aae76f49..97aa315b 100644 --- a/src/Transport/Sendmail.php +++ b/src/Transport/Sendmail.php @@ -139,11 +139,12 @@ public function send(Mail\Message $message) // On *nix platforms, we need to replace \r\n with \n // sendmail is not an SMTP server, it is a unix command - it expects LF + // Should not apply to additional headers per php mail()page. if (PHP_VERSION_ID < 80000 && ! $this->isWindowsOs()) { $to = str_replace("\r\n", "\n", $to); $subject = str_replace("\r\n", "\n", $subject); $body = str_replace("\r\n", "\n", $body); - $headers = str_replace("\r\n", "\n", $headers); + // $headers = str_replace("\r\n", "\n", $headers); } ($this->callable)($to, $subject, $body, $headers, $params); From ede7a4417ad046867b7c73f2842412de6dbfdf75 Mon Sep 17 00:00:00 2001 From: cloudseeder Date: Thu, 4 May 2023 06:01:06 -0700 Subject: [PATCH 2/3] Create HeaderTest.php Signed-off-by: cloudseeder --- test/Storage/HeaderTest.php | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/Storage/HeaderTest.php diff --git a/test/Storage/HeaderTest.php b/test/Storage/HeaderTest.php new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/test/Storage/HeaderTest.php @@ -0,0 +1 @@ +test From 9c5c55b5e2185743441b72e30f828f494dae4619 Mon Sep 17 00:00:00 2001 From: cloudseeder Date: Thu, 4 May 2023 06:05:51 -0700 Subject: [PATCH 3/3] Delete HeaderTest.php Signed-off-by: cloudseeder --- test/Storage/HeaderTest.php | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test/Storage/HeaderTest.php diff --git a/test/Storage/HeaderTest.php b/test/Storage/HeaderTest.php deleted file mode 100644 index 9daeafb9..00000000 --- a/test/Storage/HeaderTest.php +++ /dev/null @@ -1 +0,0 @@ -test