diff --git a/src/Decode.php b/src/Decode.php index 59a9583..dc30256 100644 --- a/src/Decode.php +++ b/src/Decode.php @@ -116,6 +116,12 @@ public static function splitMessage($message, &$headers, &$body, $EOL = Mime::LI return; } + // see @ZF2-372, pops the first line off a message if it doesn't contain a header + $parts = explode(': ', $firstline, 2); + if (count($parts) != 2) { + $message = substr($message, strpos($message, $EOL)+1); + } + // find an empty line between headers and body // default is set new line if (strpos($message, $EOL . $EOL)) {