Christian Kolb
Christian Kolb

Reputation: 1388

PHP Library to request emails from IMAP

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.

Upvotes: 6

Views: 5681

Answers (4)

dnshio
dnshio

Reputation: 924

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.

Upvotes: 1

Robert K
Robert K

Reputation: 30328

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.

Upvotes: 0

Lusitanian
Lusitanian

Reputation: 11132

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.

Upvotes: 3

Dzhuneyt
Dzhuneyt

Reputation: 8701

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.

Upvotes: 1

Related Questions