ZF-1795: Corrupted Attachments
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.