ZF-11175: Zend_Mail_Protocol_Imap truncating the contents of email

Description

The original email has an attachment. The (almost) original email. http://pastebin.com/0wpDkyrR

What I get from Zend_Mail_Protocol_Imap::fetch() http://pastebin.com/Cttftnw7

I debugged the contents up to _nextLine() where is the fgets command that actually gets the text, but even here the last line (the encoded attachment) reaches truncated.

$line = @fgets($this->_socket);

By truncating and ending the content prematurely it malforms it and generates other problems like ZF-10168.

I've tried to add a size to fgets() but to no results. I also enabled/disabled "auto_detect_line_endings" php_ini setting, again to no result.

The file gets truncated in the middle of the line with no apparent reason.

The file contains some sql exports with lines like "----------;----------;----------;-----;--------------------;----------;----------;----------;----------;----------;---------;----------", but the interrupt happend randomly in the line.

I cannot say on what is causing the problem. Other emails are just fine.

Comments

No comments to display