Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more information to the README.md file. #7

Merged
merged 1 commit into from Sep 18, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 31 additions & 1 deletion README.md
Expand Up @@ -8,4 +8,34 @@ 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.
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";
}