ZF-2324: Corrupt attachments with MS Exchange/Outlook

Issue Type: Bug Created: 2007-12-18T09:16:56.000+0000 Last Updated: 2008-11-13T14:10:04.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Justin Hendrickson (toxygene) Assignee: Thomas Weidner (thomas) Tags: - Zend_Mail

  • Zend_Mime

Related issues: Attachments:


Attachments, sent by Zend_Mail to mailboxes on MS Exchange servers and retrieved with Outlook, are corrupt.

The initial conversations about the bug can be found here:…

Two different users also reported the same fix for the problem:……

Each user changed the LINELENGTH in Zend_Mime from 74 to 72, which resolved the problem.


Posted by Paul Menheere (paulmenheere) on 2008-03-31T09:18:14.000+0000

It also affects version 1.5 and seems to be the problem with Microsoft SBS 2003 as mailtransport.

Posted by Justin Hendrickson (toxygene) on 2008-04-13T13:21:00.000+0000

This has been sitting out here for quite a while with no resolution and it's a very simple fix. If there's concern about breaking existing functionality, could we at least make th line length customizable, but defaults to 74, so those of us that need this change can actually use the mail library?

Posted by Wil Sinclair (wil) on 2008-04-18T15:48:53.000+0000

Please evaluate and categorize/assign as necessary.

Posted by Jeremy Coates (cocomp) on 2008-05-10T03:22:19.000+0000

Just done some testing with one of our clients who has been seeing this corruption for every PDF attached.

Their environment Win2K3 server, Exchange 2K3 (v6.5.76381), XP & Vista Clients Outlook 2K3

Width 74 - PDF files arrive corrupted every time Width 72 - PDF files arrive as expected

Impact on other clients - non noticeable - e.g. SBS Exchange / Outlook 2K3, Thunderbird (multi-platform), Gmail, Hotmail, Yahoo! all work fine.

I'd suggest we move to 72 width as the default (or at least have a configurable option as suggested).

Posted by Jeremy Coates (cocomp) on 2008-05-10T03:24:44.000+0000

Just to confirm, this is still an issue with 1.5.x ZF.

Posted by Jeremy Coates (cocomp) on 2008-05-12T00:58:07.000+0000

Further investigation seems to indicate switching to 72 is fine for PDFs but not e.g. Zip files.

Perhaps there's a wider issue at work?!

Posted by Frederic Marchal (numberxiii) on 2008-06-10T03:01:01.000+0000

Our customers have encountered this corruption for every file attached, not only PDF.

Their environment is : Exchange v6.5, Outlook 2K3

I read the source of ezc, PHPmailer class and PEAR::Mail, and I found they all use a line length of 76.

So, I changed the constant LINELENGTH (line 41 of Mime.php) to 76, and it works well for every attachments. I do not tried zip files.

Posted by Karol Grecki (antych) on 2008-09-02T03:56:05.000+0000

There's a hotfix for it at… It would still be nice to have some workaround for it as most corporate users won't install it untill next service pack is released.

Posted by Thomas Weidner (thomas) on 2008-11-06T13:06:58.000+0000

Fixed with r12343. Changed linelength to 72 to be compatible with other mailers.

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:04.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2022 by Zend by Perforce. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.