<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ERROR);
require_once 'src/imap.php';
/*
* imap credentials goes here
*/
$authhost = "{xxxx.net:143/novalidate-cert}INBOX";
$email = "yyy@xxxx.net"; //dummy text. I swear i dont have typo here
$emailPassword = "zzzz"; //dummy text. No typo here.
$imap = new imap($authhost, $email, $emailPassword);
/*
* if you want to save in db.
*/
$imap->save_into_db = FALSE; //default its TRUE
/*
* if @save_into_db=TRUE then plz provide following details
*/
$imap->serverIP = "localhost";
$imap->userName = "****";
$imap->userPassword = "********";
$imap->databaseName = "db_name";
/*
* get new mails
*/
$imap->search("UNSEEN");
/*
* ooooh its done!
*/
|