Download the PHP package php-imap/php-imap without Composer
On this page you can find all versions of the php package php-imap/php-imap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php-imap/php-imap
More information about php-imap/php-imap
Files in php-imap/php-imap
Package php-imap
Short Description Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)
License MIT
Homepage https://github.com/barbushin/php-imap
Rated 1.00 based on 1 reviews
Informations about the package php-imap
PHP IMAP
Initially released in December 2012, the PHP IMAP Mailbox is a powerful and open source library to connect to a mailbox by POP3, IMAP and NNTP using the PHP IMAP extension. This library allows you to fetch emails from your email server. Extend the functionality or create powerful web applications to handle your incoming emails.
Features
- Connect to mailbox by POP3/IMAP/NNTP, using PHP IMAP extension
- Get emails with attachments and inline images
- Get emails filtered or sorted by custom criteria
- Mark emails as seen/unseen
- Delete emails
- Manage mailbox folders
Requirements
PHP Version | php-imap Version | php-imap status |
---|---|---|
5.6 | 3.x | End of life |
7.0 | 3.x | End of life |
7.1 | 3.x | End of life |
7.2 | 3.x, 4.x | End of life |
7.3 | 3.x, 4.x | End of life |
7.4 | >3.0.33, 4.x, 5.x | Active support |
8.0 | >3.0.33, 4.x, 5.x | Active support |
8.1 | >4.3.0, 5.x | Active support |
- PHP
fileinfo
extension must be present; so make sure this line is active in your php.ini:extension=php_fileinfo.dll
- PHP
iconv
extension must be present; so make sure this line is active in your php.ini:extension=php_iconv.dll
- PHP
imap
extension must be present; so make sure this line is active in your php.ini:extension=php_imap.dll
- PHP
mbstring
extension must be present; so make sure this line is active in your php.ini:extension=php_mbstring.dll
- PHP
json
extension must be present; so make sure this line is active in your php.ini:extension=json.dll
Installation by Composer
Install the latest available release:
$ composer require php-imap/php-imap
Install the latest available and stable source code from master
, which is may not released / tagged yet:
$ composer require php-imap/php-imap:dev-master
Run Tests
Before you can run the any tests you may need to run composer install
to install all (development) dependencies.
Run all tests
You can run all available tests by running the following command (inside of the installed php-imap
directory): composer run tests
Run only PHPUnit tests
You can run all PHPUnit tests by running the following command (inside of the installed php-imap
directory): php vendor/bin/phpunit --testdox
Integration with frameworks
- Symfony - https://github.com/secit-pl/imap-bundle
Getting Started Example
Below, you'll find an example code how you can use this library. For further information and other examples, you may take a look at the wiki.
By default, this library uses random filenames for attachments as identical file names from other emails would overwrite other attachments. If you want to keep the original file name, you can set the attachment filename mode to true
, but then you also need to ensure, that those files don't get overwritten by other emails for example.
Method imap()
allows to call any PHP IMAP function in a context of the instance. Example:
Some request require much time and resources:
Upgrading from 3.x
Prior to 3.1, Mailbox
used a "magic" method (Mailbox::imap()
), with the
class Imap
now performing it's purpose to call many imap_*
functions with
automated string encoding/decoding of arguments and return values:
Before:
After:
Recommended
- Google Chrome extension PHP Console
- Google Chrome extension JavaScript Errors Notifier
All versions of php-imap with dependencies
ext-fileinfo Version *
ext-iconv Version *
ext-imap Version *
ext-mbstring Version *
ext-json Version *