|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-03-17 15:17 UTC] pudge601 at hotmail dot com
[2020-08-17 15:34 UTC] thomas at landauer dot at
[2020-09-14 10:10 UTC] cmb@php.net
-Status: Open
+Status: Analyzed
-Type: Bug
+Type: Documentation Problem
-Assigned To:
+Assigned To: cmb
[2020-09-14 10:10 UTC] cmb@php.net
[2020-09-14 11:43 UTC] cmb@php.net
-Status: Analyzed
+Status: Closed
[2020-09-14 11:43 UTC] cmb@php.net
[2020-09-14 11:44 UTC] phpdocbot@php.net
[2020-09-15 00:50 UTC] phpdocbot@php.net
[2020-12-30 11:59 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 00:00:01 2025 UTC |
Description: ------------ With a not multipart mail the body is fetched without the last line. Appending a new line to the end "solves" the problem. Test script: --------------- <?php error_reporting(E_ALL); ini_set('display_errors', 1); header('Content-type: text/plain'); $tekst = <<<EOD From: someone@example.com To: someone_else@example.com Subject: An RFC 822 formatted message This is the plain text body of the message. Note the blank line between the header information and the body of the message. EOD; $stream = fopen('php://memory', 'r+'); fwrite($stream, $tekst); fseek($stream, 0); $resource = mailparse_msg_create(); mailparse_msg_parse($resource, fread($stream, 10000)); echo mailparse_msg_extract_part($resource, $stream); Expected result: ---------------- This is the plain text body of the message. Note the blank line between the header information and the body of the message. Actual result: -------------- This is the plain text body of the message. Note the blank line 1