ZF-3646: Automaticly add attachments for included images


Most common email clients do not show embeded images, unless the user allow that Therefore there should be some functionality which automaticly send embeded images as email attachments with correct headers. I believe this is worth to implement.

Programmer just passes $mail->setBodyHTML() and something like $mail->sendEmbededImagesAsAttachment() and all xxx will be automaticly included in email as attachments with correct headers

working example with source code inside attachment


Zend_Mime_Part with content-location header ability

Example how to automaticly load attachments for embeded images in email

This feature requires Content-Location header

That sounds like too much magic for Zend_Mail. It's already possible to parse the html body and fetching the mails before creating the mail message. And normally you'd use the content-id with a cid: URL. If we leave that out of Zend_Mail you also have to possibility to use data: URIs, or inline stylesheets or javascript - adding all this possibilities to Zend_Mail makes it just bloated.

This is an extension that should reside in userland code, not in Zend_Mail itself.

You have conviced me :) I agree this feature will really bloat the code little bit.

issue is only resolved not closed.