ZF2-581: Cannot send Mime Version Email from File

Description

This actually has more to do with Zend\Mail\Storage\Message

Here are the email headers giving the problems (I truncated them, since it contains an image) -> http://pastebin.com/x0iPrF48 This email was created using this example -> http://zf2.readthedocs.org/en/latest/…

So the email is stored in a file and later I open it with $message = new Zend\Mail\Storage\Message(array('file' => $filename)); When you attempt to send the email using Zend\Mail\Message you are given this error:

Caught Exception Zend\Mail\Exception\RuntimeException does not match header format! This is a message in Mime Format. If you see this, your mail reader does not support this format.

After trying several things out I decided to open the email saved to file and remove the line regarding it being in Mime Format. To my surprise, the email was instantly sent without a problem. Looking at the email in my inbox, I see the Mime Format line was automagically added back and everything worked as expected.

This does not happen when the email is not in Mime Format, it works perfectly and as expected.

Comments

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2606