Zend Framework: how to read email attachments (and save to disk)?

I am currently using Zend_Mail_Storage_Imap to read emails using IMAP. I can read the body of the email (text and html) thanks to the documentation.

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

+6
source share
2 answers

I found that reading emails using Zend_Mail might be a bit of a mistake. Sometimes not all attachment files are recognized or in some cases imap cannot even decode the body of the message.

We use the Sendgrid service to analyze emails now, and it works very well. They have a special api for decrypting emails. on the other hand, it costs money, but I prefer better results.

0
source

Source: https://habr.com/ru/post/891325/


All Articles