Open abulhol opened 4 years ago
I have further delved into the source code.
The function public static function fromString($string, $EOL = self::EOL)
in Headers.php
which parses the full message in this case contains no condition for a break, so it is logical that the exception is thrown when the parser reaches the multipart message body.
I wonder how this bug could go unnoticed until now?
This repository has been closed and moved to laminas/laminas-mail; a new issue has been opened at https://github.com/laminas/laminas-mail/issues/6.
We are using zend-mail to fetch emails via POP3 and IMAP. For integration tests, we run an instance of Flying Rat (https://pypi.org/project/flyingrat/) to mock a mail server with POP3. We build multipart emails in Python using MIMEMultipart and send them to the server via smtplib (all standard code used there, nothing fancy).
Now when I try to fetch the emails in zend-mail via
getMessage()
, it fails with the following exception::I have tried to debug this and printed out the
$params
in Message.php_construct
. It looks to me like zend-mail is not able to parse the headers correctly because Flying Rat does not support theTOP
command and so the whole message is downloaded. Could this be a bug?Here is the full debug output of the
$params
::