2017 © Pedro Peláez
 

library php-email-reader-parser

PHP Email Reader (using IMAP) and Parser (using mimeDecode)

image

optimumweb/php-email-reader-parser

PHP Email Reader (using IMAP) and Parser (using mimeDecode)

  • Sunday, July 9, 2017
  • by optimumweb
  • Repository
  • 1 Watchers
  • 9 Stars
  • 63 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

php-email-reader-parser

What does it do?

It does something that should be so simple but turns out to be very complex using PHP: reading emails from a mailbox using IMAP and then parsing the returned emails into a dev-friendly object., (*1)

Requirements

  • PHP 5.4+
  • PHP PEAR
  • PHP IMAP extension
  • PHP mbstring extension (mb_convert_encoding)

Installation

Simply require both classes (Email_Reader and Email_Parser) inside your code., (*2)


  • Note that you can use the Email_Parser class by itself without the Email_Reader class, but not the other way around.

How to use it?

Email_Reader is used to open an IMAP stream to a mailbox and then fetch messages., (*3)

get_messages();

$unread = $reader->get_unread();

?>

Email_Parser is used within Email_Reader to be able to decode the returned emails. It can also be used by itself to read emails, for example, from php://std in the case of email piping., (*4)

#! /usr/bin/php -q
from, $email->subject, $email->body);

?>

Footnotes

In order to write these classes, I had a lot of reading of other people's work and I would like to thank the following repository owners., (*5)

Author

Jonathan Roy, web developper at OptimumWeb, (*6)

Twitter: @jonathanroy, (*7)

The Versions

09/07 2017

dev-master

9999999-dev

PHP Email Reader (using IMAP) and Parser (using mimeDecode)

  Sources   Download

The Requires