PHP Classes

File: examples/basic.php

Recommend this page to a friend!
  Classes of Marcelo Rocha   Email Reader   examples/basic.php   Download  
File: examples/basic.php
Role: Example script
Content type: text/plain
Description: Basic usage
Class: Email Reader
Retrieve email messages from POP3 or IMAP mailbox
Author: By
Last change:
Date: 8 years ago
Size: 494 bytes


Class file image Download
require_once 'vendor/autoload.php';
$MailBox = EmailMD\MailBoxFactory::gmail(

$MailBox->reverse();//Newest message first
$MailBox->filterSince(new DateTime());//Just message recieved today
    //Get messages
foreach ( $MailBox as $messageNumber => $message ) {
'Message number: ' . $messageNumber . PHP_EOL;
$message->getSubject() . PHP_EOL;