A framework for building automated email applications in PHP
PHP CSS
Latest commit d408667 Aug 31, 2013 @sophistry commented code to convert all PLAIN parts to uft8
this is optional code to convert all PLAIN and HTML parts to utf8. if you are having problems with database insert of email body this may help... commented by default because utf8 may not be the desired default encoding and this hard codes it.
Permalink
Failed to load latest commit information.
docs Update master Jun 27, 2012
.gitignore ignore Dec 23, 2011
LICENSE.md Update LICENSE.md Aug 31, 2013
README.md Update README.md Sep 29, 2012
demo_gmail_imap.php Updating to PHP 5 class syntax (public, etc…) Dec 23, 2011
peeker.php Hammercake bugfix to mime_str charset Aug 31, 2013
peeker_autoresponder_methods.php PHP 5 changes to parent::__construct, removed __toString magic method… Dec 24, 2011
peeker_body.php commented code to convert all PLAIN parts to uft8 Aug 31, 2013
peeker_ci_methods.php PHP 5 changes to parent::__construct, removed __toString magic method… Dec 24, 2011
peeker_connect.php Set message_count property to NULL on initialization so method can be… Dec 24, 2011
peeker_db_methods.php PHP 5 changes to parent::__construct, removed __toString magic method… Dec 24, 2011
peeker_detector.php PHP 5 changes to parent::__construct, removed __toString magic method… Dec 24, 2011
peeker_detector_set.php PHP 5 changes to parent::__construct, removed __toString magic method… Dec 24, 2011
peeker_file.php PHP 5 changes to parent::__construct, removed __toString magic method… Dec 24, 2011
peeker_header.php PHP 5 changes to parent::__construct, removed __toString magic method… Dec 24, 2011
peeker_layers.php Initial Commit Dec 23, 2011
peeker_listserv_methods.php PHP 5 changes to parent::__construct, removed __toString magic method… Dec 24, 2011
peeker_parts.php Handle XML attachments properly Aug 31, 2013

README.md

Peeker - A framework for building automated email applications.

Please read the documentation here http://sophistry.github.com/peeker and in the docs directory

Peeker is a wrapper around the IMAP/POP3 extension available in PHP. It helps you avoid learning all the strange things about talking to an email server and concentrate on getting email as objects and properly-decoded attachments onto your filesystem.

Start with the Quick Start in peeker_quickstart.html.

Basic usage: (gmail IMAP, make sure IMAP is enabled in your gmail account)

// class files in peeker directory
// change these lines
// the path to the peeker.php class file
include('path/to/peeker.php');
// this can also be a Google Apps email account
$config['login']='your_gmail_address@gmail.com';
$config['pass']='your_gmail_password';

// do not change these lines
// this should not change unless you are having problems
$config['host']='imap.gmail.com';
$config['port']='993';
$config['service_flags'] = '/imap/ssl/novalidate-cert';

// you can definitely change these lines!
// because your application code goes here
$peeker = new peeker($config);
$cnt = $peeker->get_message_count();
echo $cnt.' message waiting';

// EOF

Advanced PHP developers only: Peeker also has a declarative Event programming architecture (Detector-Callback circuit) and "Traits-like" method layering (a simple Dependency Injection - just drop in a custom class and request the new methods be added to the email objects).