Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tedious/Fetch
An IMAP library for PHP
https://github.com/tedious/Fetch
Last synced: about 2 months ago
JSON representation
An IMAP library for PHP
- Host: GitHub
- URL: https://github.com/tedious/Fetch
- Owner: tedious
- License: other
- Created: 2012-06-10T21:57:02.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T18:25:13.000Z (11 months ago)
- Last Synced: 2024-05-22T15:08:18.728Z (7 months ago)
- Language: PHP
- Homepage: http://www.tedivm.com
- Size: 1.48 MB
- Stars: 501
- Watchers: 27
- Forks: 158
- Open Issues: 79
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome - tedious/Fetch - An IMAP library for PHP (PHP)
- awesome-php - Fetch - An IMAP library. (Table of Contents / Email)
- awesome-projects - Fetch - An IMAP library. (PHP / Email)
- awesome-php - Fetch - An IMAP library. (Table of Contents / Email)
- awesome-php-cn - Fetch - 一个IMAP库. (目录 / 电子邮件 Email)
README
# Fetch [![Build Status](https://travis-ci.org/tedious/Fetch.svg?branch=master)](https://travis-ci.org/tedious/Fetch)
[![License](http://img.shields.io/packagist/l/tedivm/fetch.svg)](https://github.com/tedious/fetch/blob/master/LICENSE)
[![Latest Stable Version](http://img.shields.io/github/release/tedious/fetch.svg)](https://packagist.org/packages/tedivm/fetch)
[![Coverage Status](http://img.shields.io/coveralls/tedious/Fetch.svg)](https://coveralls.io/r/tedious/Fetch?branch=master)
[![Total Downloads](http://img.shields.io/packagist/dt/tedivm/fetch.svg)](https://packagist.org/packages/tedivm/fetch)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`
```sh
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.7.*"
}
```### 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][:releases:].
## 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.```php
use Fetch\Server;
use Fetch\Message;$server = new Server('imap.example.com', 993);
$server->setAuthentication('username', 'password');/** @var Message[] $message */
$messages = $server->getMessages();foreach ($messages as $message) {
echo "Subject: {$message->getSubject()}", PHP_EOL;
echo "Body: {$message->getMessageBody()}", PHP_EOL;
}
```## License
Fetch is licensed under the BSD License. See the LICENSE file for details.
[:releases:]: https://github.com/tedious/Fetch/releases