You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Per RFC 7103 section 7.3, having whitespace on an otherwise empty line is deprecated but still valid. I'm running into this with emails generated by some Microsoft product.
Code to reproduce the error:
require__DIR__.'/vendor/autoload.php';
$src = "From: user@example.comTo: userpal@example.netSubject: This is your reminder about the football game tonightDate: Wed, 20 Oct 2010 20:53:35 -0400Don't forget to meet us for the tailgate party!";
newZend\Mail\Storage\Message(array('raw' => $src));
This results in:
PHP Fatal error: Uncaught exception 'Zend\Mail\Exception\RuntimeException' with message 'Malformed header detected' in vendor/zendframework/zend-mail/src/Headers.php:88
vendor/zendframework/zend-mail/src/Headers.php:88
vendor/zendframework/zend-mime/src/Decode.php:142
vendor/zendframework/zend-mail/src/Storage/Part.php:105
vendor/zendframework/zend-mail/src/Storage/Message.php:54
One workaround is to use pipe the message source through formail first and tell it to merge header lines: formail -c -f
Per RFC 7103 section 7.3, having whitespace on an otherwise empty line is deprecated but still valid. I'm running into this with emails generated by some Microsoft product.
Code to reproduce the error:
This results in:
One workaround is to use pipe the message source through formail first and tell it to merge header lines:
formail -c -f