An IMAP library for PHP
Go to file
Robert Hafner 9bcd94b866 Merge pull request #139 from benr77/patch-1
Update docblock with correct return type
2015-07-09 14:17:57 -07:00
src/Fetch Merge pull request #139 from benr77/patch-1 2015-07-09 14:17:57 -07:00
tests Fixed PSR formatting 2015-06-06 22:48:30 -07:00
.coveralls.yml Added code coverage and styling tests, refactored 2014-04-16 00:28:38 -07:00
.gitignore Added code coverage and styling tests, refactored 2014-04-16 00:28:38 -07:00
.travis.yml Fixed allowed_failures formatting 2015-01-07 19:41:48 -08:00
autoload.php Formatting! PSR Compliance 2014-04-16 00:35:51 -07:00
composer.json Updated php-cs-fixer 2014-09-24 18:46:49 -07:00
CONTRIBUTING.md Added contributing file 2014-04-19 23:42:32 -07:00
LICENSE Added License 2012-06-10 17:54:41 -07:00
phpunit.xml.dist Added code coverage and styling tests, refactored 2014-04-16 00:28:38 -07:00
README.md Debian / Ubuntu installation NB added! 2015-05-06 13:57:13 +01:00

Fetch Build Status

License Latest Stable Version Coverage Status Total Downloads

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

Installing

N.b. A note on Ubuntu 14.04 (probably other Debian-based / Apt managed systems), the install of php5-imap does not enable the extension for CLI (possibly others as well), which can cause composer to report fetch requires ext-imap

sudo ln -s /etc/php5/mods-available/imap.ini /etc/php5/cli/conf.d/30-imap.ini

Composer

Installing Fetch can be done through a variety of methods, although Composer is recommended.

Until Fetch reaches a stable API with version 1.0 it is recommended that you review changes before even Minor updates, although bug fixes will always be backwards compatible.

"require": {
  "tedivm/fetch": "0.6.*"
}

Pear

Fetch is also available through Pear.

$ pear channel-discover pear.tedivm.com
$ pear install tedivm/Fetch

Github

Releases of Fetch are available on Github.

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.

$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";
}

License

Fetch is licensed under the BSD License. See the LICENSE file for details.