PHP code example of armorlab / imap

1. Go to this page and download the library: Download armorlab/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/ */

    

armorlab / imap example snippets


$connection = new \ArmorLab\Driver\Connection('imap.google.com', 993);

$imapDriver = new \ArmorLab\Driver\ImapDriver($connection);
$imapDriver->login('login', 'password');

//list active folders from mailbox
$folders = $imapDriver->getActiveFolders();