Zend Framework

Corrupted Attachments

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.0
  • Fix Version/s: 1.7.0
  • Component/s: Zend_Mail
  • Labels:
    None

Description

I am having troubled with attachments when sending to AT&T (Cingular) MM3 Email-to-MMS gateway via SMTP. Unfortunately the gateway's software is a black box to me, but the result that it "removed corrupted mime part image/jpeg".

$mail->createAttachment($data['image'], 'image/jpeg', Zend_Mime::DISPOSITION_INLINE, Zend_Mime::ENCODING_BASE64, $message->id."-img.jpg");

$data['image'] is the result of imagejpeg().

All this works really well with PEAR::Mail. I have played around with changing line end characters and changing the line length, but it does not solve anything.

Mail.app on Mac and Outlook on Windows can read the attachments, but when I save it from Exchange Webmail, it seems a little corrupted too (maybe because that front-end is not that smart to correct errors.)

Something seems fishy in Zend_Mime or Zend_Mail_Smtp and I cannot figure it out.

Activity

Hide
Darby Felton added a comment -

Assigning to Matthew Weier O'Phinney to initiate issue review.

Show
Darby Felton added a comment - Assigning to Matthew Weier O'Phinney to initiate issue review.
Hide
Matthew Weier O'Phinney added a comment -

Assigning to Nico

Show
Matthew Weier O'Phinney added a comment - Assigning to Nico
Hide
C. Suermann added a comment -

The problem seems to occur not always but rather sporadically. Unfortunately I cannot say under which circumstances the attachment gets corrupted. When I run the very same code several times, most of the times everything works as expected, but sometimes the attachment is broken. Hope this helps.

Show
C. Suermann added a comment - The problem seems to occur not always but rather sporadically. Unfortunately I cannot say under which circumstances the attachment gets corrupted. When I run the very same code several times, most of the times everything works as expected, but sometimes the attachment is broken. Hope this helps.
Hide
Thomas Weidner added a comment -

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

Seems to be related to ZF-4360 and ZF-4169.
Feel free to reopen if it is not fixed for your environment.

Show
Thomas Weidner added a comment - Fixed with r12343. Changed linelength to 72 to be compatible with other mailers. Seems to be related to ZF-4360 and ZF-4169. Feel free to reopen if it is not fixed for your environment.
Hide
Wil Sinclair added a comment -

Changing issues in preparation for the 1.7.0 release.

Show
Wil Sinclair added a comment - Changing issues in preparation for the 1.7.0 release.

People

Vote (6)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: