PHP code example of zalazdi / laravel-imap
1. Go to this page and download the library: Download zalazdi/laravel-imap library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zalazdi / laravel-imap example snippets
use Zalazdi\LaravelImap\Client;
use Zalazdi\LaravelImap\Mailbox;
// ...
$client = new Client();
$client->connect();
$mailboxes = $client->getMailboxes();
foreach($mailboxes as $mailbox) {
dump($mailbox->getMessages());
}
php artisan vendor:publish --provider="Zalazdi\LaravelImap\Providers\LaravelServiceProvider"
config/imap.php