2017 © Pedro Peláez
 

library imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

image

particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  • Sunday, July 29, 2018
  • by mikegioia
  • Repository
  • 2 Watchers
  • 3 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 45 Versions
  • 0 % Grown

The README.md

Pb\Imap

Pb\Imap is a library for downloading and parsing IMAP email messages. For performance reasons, the PHP IMAP extension is specifically not used, in favor of the Laminas Mail library., (*1)

Separate forks of the Laminas Mail and Laminas Mime libraries are used and kept as up to date as possible. These forks are needed to make minor but necessary updates that wouldn't be approved in time or at all by the Laminas maintainers., (*2)

Memory performance is the goal of this library and it's been stabilized and reduced as much as possible. Depending on file attachment downloads, this application uses on average 10-20 MB of memory, with a peak of up to 75-100 MB during large attachment downloads., (*3)

Features

  • Connect to mailbox via IMAP
  • Get a listing of all folders
  • Download email messages and save attachments to disk
  • Search emails by custom criteria
  • Get status information on each folder

Installation by Composer

{
  "require": {
    "particlebits/imap": "^2.1"
  }
}

or, (*4)

$> composer require particlebits/imap ^2.1

Usage Example

$mailbox = new \Pb\Imap\Mailbox(
    'imap.gmail.com',
    'something@gmail.com',
    '**********',
    'INBOX',
    __DIR__ .'/attachments',
    [
        \Pb\Imap\Mailbox::OPT_DEBUG_MODE => true
    ]);
$messageIds = $mailbox->searchMailBox('ALL');

foreach ($messageIds as $messageId) {
    $message = $mailbox->getMessage($messageId);
    print_r($message);
    print_r($message->getAttachments());
}

Available Options

You can use the following options in the final argument of the Mailbox constructor:, (*5)

  • OPT_DEBUG_MODE This will write memory info to the screen
  • OPT_SKIP_ATTACHMENTS Skips downloading message attachments. Useful for saving disk space.

Notes

This project originally used the PHP IMAP extension for fetching and parsing email messages. The extension is not very memory efficient for long-running processes, which is my intended use. Instead, this library uses the Laminas Mail package. Laminas Mail retrieves messages through a socket connection and parses the headers. \Pb\Imap takes this raw message object and converts into something more user-friendly., (*6)

For more examples see the scripts inside the tests/ folder., (*7)

The Versions

29/07 2018

dev-master

9999999-dev https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

29/07 2018

1.2.3

1.2.3.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

28/07 2018

1.2.2

1.2.2.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

28/07 2018

1.2.1

1.2.1.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

27/07 2018

1.2.0

1.2.0.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

22/07 2018

1.1.0

1.1.0.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

04/01 2016

1.0.9

1.0.9.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

04/01 2016

1.0.8

1.0.8.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

03/01 2016

1.0.7

1.0.7.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

03/01 2016

1.0.6

1.0.6.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

03/01 2016

1.0.5

1.0.5.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

03/01 2016

1.0.4

1.0.4.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

03/01 2016

1.0.3

1.0.3.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

01/01 2016

1.0.2

1.0.2.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

31/12 2015

1.0.1

1.0.1.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

30/12 2015

1.0.0

1.0.0.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

30/12 2015

0.5.4

0.5.4.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

27/12 2015

0.5.3

0.5.3.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

27/12 2015

0.5.2

0.5.2.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

27/12 2015

0.5.1

0.5.1.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

27/12 2015

0.5.0

0.5.0.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

27/12 2015

0.4.10

0.4.10.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.9

0.4.9.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.8

0.4.8.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.7

0.4.7.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.6

0.4.6.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.5

0.4.5.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.4

0.4.4.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.3

0.4.3.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.2

0.4.2.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.1

0.4.1.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.4.0

0.4.0.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.3.3

0.3.3.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

26/12 2015

0.3.2

0.3.2.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

24/12 2015

0.3.1

0.3.1.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

24/12 2015

0.3.0

0.3.0.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

23/12 2015

0.2.3

0.2.3.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

23/12 2015

0.2.2

0.2.2.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

23/12 2015

0.2.1

0.2.1.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

23/12 2015

0.2.0

0.2.0.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

23/12 2015

0.1.4

0.1.4.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

23/12 2015

0.1.3

0.1.3.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

23/12 2015

0.1.2

0.1.2.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

23/12 2015

0.1.1

0.1.1.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap

23/12 2015

0.1.0

0.1.0.0 https://github.com/particlebits/imap

PHP class to access an IMAP mailbox. Specifically uses the Zend library and not the IMAP extension.

  Sources   Download

BSD-3-Clause

The Requires

 

mail fetch php imap