An IMAP library for PHP
Go to file
Robert Hafner 10ec1b6a97 Updated test messages
During testing I realized that the transfer of messages to the test
server did not actually occur in the right order, which made some test
results counter intuitive. I've reshuffled the messages around so
things will make more sense.
2013-12-08 17:16:44 -08:00
src/Fetch preserve newlines when stripping HTML tags 2013-09-20 01:53:29 +03:00
tests Updated test messages 2013-12-08 17:16:44 -08:00
.gitignore Initial Vagrant setup 2013-12-01 15:53:05 -08:00
.travis.yml Added travis.ci file 2013-12-05 14:01:18 -08:00
autoload.php Updated autoloader to support test cases, and bootstrapper to support composer autoloader 2013-12-04 23:34:08 -08:00
composer.json Add "ext-imap" to composer.json 2013-04-29 13:44:52 +03:00
LICENSE Added License 2012-06-10 17:54:41 -07:00
package.xml Changes from beta to alpha 2012-11-25 23:22:05 -08:00
phpunit.xml.dist Updated code coverage to only include Fetch code 2013-12-05 18:01:02 -08:00
README.md Added more information to the README.md file. 2012-09-18 13:22:21 +02:00

Fetch

Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols.

Fetch was part of a large project, Mortar, which is hosted on Google Code. It is currently being migrated over to Github, as well as being updated to support modern php features. While the project is in flux I encourage you to try it out, but be careful about using it in a production environment without proper testing.

Installation

The most easy way to install the library is via composer. To do so, you have to do the following:

php composer.phar require tedivm/fetch

Composer will then ask you which version you want to install. Until there are stable versions, by using "@dev" it'll install the latest version.

Sample Usage

This is just a simple code to show how to access messages by using Fetch. It uses Fetch own autoload, but it can (and should be, if applicable) replaced with the one generated by composer.

require 'autoload.php';

$server = new \Fetch\Server('imap.example.com', 993);
$server->setAuthentication('dummy', 'dummy');


$messages = $server->getMessages();
/** @var $message \Fetch\Message */
foreach ($messages as $message) {
    echo "Subject: {$message->getSubject()}\nBody: {$message->getMessageBody()}\n";
}