minetro / imap
Simple IMAP wrapper
Fund package maintenance!
f3l1x
Installs: 11 903
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 3
Open Issues: 0
Requires (Dev)
- nette/tester: ~1.3.0
This package is auto-updated.
Last update: 2021-11-02 12:24:29 UTC
README
Simple IMAP wrapper.
Discussion / Help
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; } }