Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acucchieri/php-imap
https://github.com/acucchieri/php-imap
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/acucchieri/php-imap
- Owner: acucchieri
- License: mit
- Created: 2015-10-26T09:26:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T10:10:38.000Z (over 1 year ago)
- Last Synced: 2024-08-18T03:13:47.888Z (3 months ago)
- Language: PHP
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
php-imap
========An object oriented PHP IMAP library.
PHP >= 8.1 is required for version 2.x. For PHP 7 or earlier, use version 1.x.
Installation
------------```
composer require acucchieri/php-imap
```Usage
-----``` php
'imap-server.domain.tld', // Hostname. Required
'port' => 143, // Host port. Default : 143
'folder' => 'INBOX', // Mailbox name. Default : 'INBOX'
'user' => 'user-login', // Login. Required
'password' => 'user-password', // Password. Required
'flags' => [], // Connection flags. Optionnal
'lazy' => false, // Lazy mode. Default : false
]);/** @var \AC\Imap\Collection\MessageCollection $result */
$result = $imap->search('FROM "[email protected]"');foreach ($result as $message) {
/** @var \AC\Imap\Message $message */
var_dump($message->getSubject());
}
```Tests
-----Create phpunit.xml file based on phpunit.xml.dist and populate environment variables.
```
./vendor/bin/phpunit
```