Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Zend_Mime_Part issue with stream pointer not at start #701

Open
tsmgeek opened this issue Jun 6, 2016 · 0 comments
Open

Zend_Mime_Part issue with stream pointer not at start #701

tsmgeek opened this issue Jun 6, 2016 · 0 comments

Comments

@tsmgeek
Copy link

tsmgeek commented Jun 6, 2016

I have found an issue when passing file resources to Zend_Mime_Part.
We load load a single instance and add multiple images to an email using new Zend_Mime_Part($fh).
Once that is complete, as we wish to edit the HTML per recipient slightly we then render a unique HTML per user but the images/CID are the same so we do not need attach the files again and again.
Problem is that when we are using file handles with Zend_Mime_Part the resource is not rewound after each time the contents are read.
The first recipient gets the images while all the others get none, the parts are in the email but with no data.
It may be an idea that is isStream=true, that each time getContents() or getRawContents() both implement rewind() on the resource, or a method to allow doing this.

@tsmgeek tsmgeek changed the title Zend_Mime_Part issue with streams not at start Zend_Mime_Part issue with stream pointer not at start Jun 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants