There are many libraries for PHP which are great to send emails. But which is the most reliable one to request emails from an IMAP account? Especially emails with attachments.
One wouldn't choose a framework based upon it's IMAP capabilities, considering that you should be able to load a powerful IMAP library alongside any framework. You may want to use the Horde IMAP driver, a powerful abstraction layer for the protocol.
I don't know of a framework that supports this, but a lot of frameworks give you the option to load custom libraries or classes.
The ideal solution in many cases I think is the simplest one. PHP-imap can connect to POP3/IMAP/NNTP mailboxes and supports attachments.
Fetch is a pretty nice Object Oriented wrapper for working with native PHP Imap functions. It cannot do anything that PHP's own IMAP functions cannot do but it does give you bunch of nice object oriented APIs for your to write your code around. At the time of writing this, Fetch library is still in development. It already supports Messages and Attachments but coverage falls short for some IMAP functions such as imap_thread. Fetch server interface has a method to get all messages from a given mailbox but does not have a method to get messages aggregated in to threads as yet.
https://github.com/tedious/Fetch
P.S: I am not the owner of this project nor have I contributed any code to it. I've used it for some experimental projects but never in a production environment.
There's a built-in IMAP module that may be compiled in your copy of PHP. In your phpinfo() output there should be something like --with-imap[=DIR]
. If you have it, then you might be able to do everything you need with the existing PHP module.
© 2022 - 2024 — McMap. All rights reserved.