2017 © Pedro Peláez
 

library imap-idle

An implementation of the IMAP IDLE (RFC 2177) based on the pear/Net_IMAP

image

noi/imap-idle

An implementation of the IMAP IDLE (RFC 2177) based on the pear/Net_IMAP

  • Thursday, March 19, 2015
  • by noisan
  • Repository
  • 1 Watchers
  • 8 Stars
  • 1,165 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

ImapIdleClient

Extends pear/Net_IMAP and provides support for the IMAP IDLE command (RFC 2177)., (*1)

Installation

Add the following lines to your composer.json file:, (*2)

{
    "require": {
        "noi/imap-idle": "*"
    },
    "repositories": [
        {
            "type": "pear",
            "url": "pear.php.net"
        }
    ]
}

and run Composer install:, (*3)

$ php composer.phar install

(23-Sep-2013) If you get something similar to the following error:, (*4)

[UnexpectedValueException] Failed to extract PEAR package /path/to/Net_IMAP/Net_IMAP-1.1.2.tgz to /path/to/Net_IMAP. Reason: Invalid PEAR package. package.xml defines file that is not located inside tarball., (*5)

To get beyond this error, you need to add the following lines instead:, (*6)

{
    "require": {
        "noi/imap-idle": "dev-master"
    },
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "pear-pear/Net_IMAP",
                "version": "1.1.2",
                "source": {
                    "type": "git",
                    "url": "https://github.com/pear/Net_IMAP.git",
                    "reference": "1.1.2"
                },
                "require": {
                    "pear-pear/Net_Socket": ">=1.0.8"
                },
                "autoload": {
                    "classmap": ["./Net/"]
                },
                "include-path": ["./"]
            }
        },
        {
            "type": "pear",
            "url": "pear.php.net"
        }
    ]
}

It seems that this error is caused by Bug #19730., (*7)

Usage

<?php
require 'vendor/autoload.php';

$imap = new \Noi\Util\Mail\ImapIdleClient('your.imap.host', 993);
$imap->login('username', 'password');
$imap->selectMailbox('INBOX');

while (!$imap->idle(300) instanceof \PEAR_Error) {
    $mails = $imap->search('UNSEEN');
    foreach ($imap->getMessages($mails) as $mail) {
        echo '==== New Message ====', "\n";
        echo $mail, "\n";
    }
}

License

ImapIdleClient is licensed under the MIT License - see the LICENSE file for details., (*8)

The Versions

19/03 2015

dev-master

9999999-dev

An implementation of the IMAP IDLE (RFC 2177) based on the pear/Net_IMAP

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • pear-pear.php.net/net_imap *
  • pear-pear.php.net/auth_sasl *

 

by Akihiro Yamanoi

mail library imap net idle pear imap_idle net_imap

19/03 2015

v1.0.1

1.0.1.0

An implementation of the IMAP IDLE (RFC 2177) based on the pear/Net_IMAP

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • pear-pear.php.net/net_imap *
  • pear-pear.php.net/auth_sasl *

 

by Akihiro Yamanoi

mail library imap net idle pear imap_idle net_imap

19/03 2015

dev-fix-composer.json

dev-fix-composer.json

An implementation of the IMAP IDLE (RFC 2177) based on the pear/Net_IMAP

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • pear-pear.php.net/net_imap *
  • pear-pear.php.net/auth_sasl *

 

by Akihiro Yamanoi

mail library imap net idle pear imap_idle net_imap

23/09 2013

v1.0

1.0.0.0

An implementation of the IMAP IDLE (RFC 2177) based on the pear/Net_IMAP

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • pear-pear/net_imap *
  • pear-pear/auth_sasl *

 

by Akihiro Yamanoi

mail library imap net idle pear imap_idle net_imap