Componette

Componette

f00b4r

f00b4r / imap

Simple PHP IMAP wrapper

download-cloud-line composer require minetro/imap

Imap

Simple IMAP wrapper.


Downloads total Latest stable

Discussion / Help

Join the chat

Install

$ composer require minetro/imap:~1.1.0

Usage

use Minetro\Imap\ImapReader;

$reader = new ImapReader('{yourdomain.cz:143/imap}INBOX', $username, $password);
$emails = $reader->read(ImapReader::CRITERIA_UNSEEN);

// Iterate all emails
foreach ($emails as $email) {
    
    // Iterate all email parts
    for ($i = 0; $i < $email->countBodies(); $i++) {
        
        // Get text (encode with right encoding..)
        $text = $email->getBodySectionText($i);
        
        echo $text;
    }
}

No release at this moment. Try to create first one.

bar-chart-fill

Statistics

download-cloud-fill
11663
star-fill
5
bug-fill
0
flashlight-fill
5y
price-tag-2-line

Badges

Componette Componette felix@nette.org