Zend Framework: How to read email attachments (and save to disk)?
Asked Answered
M

2

7

I am currently using Zend_Mail_Storage_Imap to read email messages using IMAP. I am able to read the email body (text and html) thanks to the documentation.

Now I'm trying to figure out how to save email attachments. I can't find anything that explains how to convert the raw content and save the attachments. How can I do this?

Meroblastic answered 24/6, 2011 at 23:10 Comment(0)
K
0

I found that reading emails using Zend_Mail can be a little buggy. Sometimes not all of the attachment files are recognized or in some cases imap can't even decode the body of the email .

We're using Sendgrid service to parse emails now, and it's working pretty well. They have a special api to decode emails. on the downside, it cost money, but I prefer better results.

Kal answered 25/6, 2011 at 11:34 Comment(1)
good to know. we've actually been considering adding SendGrid to our application as well.Meroblastic

© 2022 - 2024 — McMap. All rights reserved.