David Rainsford b0d22fb76c Allow the passing of connection parameters to imap_open()
Since version 5.3.2 of PHP, imap_open() has an optional 6th
parameter which allows you to set certain connection parameters.

Currently the only key is:

- DISABLE_AUTHENTICATOR - Disable authentication properties

see https://bugs.php.net/bug.php?id=33500

Example of use:

  $server = new Server('imap.example.com', 993);
  $server->setParam('DISABLE_AUTHENTICATOR', 'GSSAPI');

This gets rid of the following errors:
<br />
<b>Notice</b>:  Unknown: Unknown GSSAPI failure: An invalid name was
supplied (errflg=1) in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Notice</b>:  Unknown: GSSAPI mechanism status: Hostname cannot be
canonicalized (errflg=1) in <b>Unknown</b> on line <b>0</b><br />
2014-04-03 10:59:19 +11:00
2013-12-01 15:53:05 -08:00
2012-06-10 17:54:41 -07:00
2012-11-25 23:22:05 -08:00
2014-01-14 00:32:45 -08:00

Fetch Build Status

Latest Stable Version Total Downloads

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

Installing

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.5.*"
}

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.

Description
An IMAP library for PHP
Readme BSD-3-Clause-HP 1.7 MiB
Languages
PHP 99.5%
Shell 0.5%