Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

MimePart is inefficient when handling in-memory data #7471

Closed
ddxor opened this issue Apr 30, 2015 · 3 comments
Closed

MimePart is inefficient when handling in-memory data #7471

ddxor opened this issue Apr 30, 2015 · 3 comments
Labels

Comments

@ddxor
Copy link

ddxor commented Apr 30, 2015

MimePart requires that I pass it a type of resource as part of the object construct.

In my scenario I have just generated a PDF which I want to attach to an e-mail. Using MimePart I have to first write that PDF to disk, get a resource for it, pass that to MimePart which will then read it back from disk again.

This is wasteful IO. I should be able to pass MimePart a string and encoding type directly.

@ddxor ddxor changed the title MimePart is inefficient when handling in-memory files MimePart is inefficient when handling in-memory data Apr 30, 2015
@Ocramius
Copy link
Member

You can create in-memory resources...
On Apr 30, 2015 08:55, "James Anslow" notifications@github.com wrote:

MimePart requires that I pass it a type of resource as part of the object
construct.

In my scenario I have just generated a PDF which I want to attach to an
e-mail. Using MimePart I have to first write that PDF to disk, get a
resource for it, pass that to MimePart which will then read it back from
disk again.

This is wasteful IO. I should be able to pass MimePart a string and
encoding type directly.


Reply to this email directly or view it on GitHub
#7471.

@ddxor
Copy link
Author

ddxor commented Apr 30, 2015

MimePart already does what I want it to internally, just not as an option during construct. Even if I construct an in-memory resource I am still having to modify memory and waste resources doing so.

@GeeH
Copy link

GeeH commented Jun 28, 2016

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html
New issue can be found at: zendframework/zend-mime#16

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants