- In your terminal via composer:
composer require Frnwtr/laravel-imap
- Add this provider to your config/app.php :
Frnwtr\LaravelImap\Providers\LaravelServiceProvider::class,
- Publish config file
php artisan vendor:publish --provider="Frnwtr\LaravelImap\Providers\LaravelServiceProvider"
then Define host, username, password, etc in your config/imap.php
.
Example usage:
use Frnwtr\LaravelImap\Client;
use Frnwtr\LaravelImap\Mailbox;
// ...
$client = new Client();
$client->connect();
$mailboxes = $client->getFolders();
foreach($mailboxes as $mailbox) {
dump($mailbox->getMessages());
}
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.