Html – Zend_Mail reading Mail


The documentation for sending mails with Zend_Mail is great but receiving mails is a pain right now. I currently want to get the plaintext part and the html part of the email. Right now I have writen a long function which goes through the parts and then looks at the headers and look at it whether it is quoated printable or base64 and I have to do da whole lot to just get the information. Am I maybe missing a function with which I can just get the plaintext and the html our of the mail?

Best Solution

AFAIK, MIME emails have no standard for the order of the different parts (HTML, plaintext, embeds). Therefore you do have to iterate over all parts and get the parts you need.

But because the structure of Zend_Mail is recursive iterating should be pretty easy. Maybe you can share your code with us so we can comment on it (if there's anything to comment)?

Related Question