Login   Register  
PHP Classes

File: examples/receive_all_inbox.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ve Bailovity  >  GmAtom  >  examples/receive_all_inbox.php  >  Download  
File: examples/receive_all_inbox.php
Role: Example script
Content type: text/plain
Description: Receive all new mail from inbox
Class: GmAtom
Access Gmail mailboxes retrieving XML Atom feeds
Author: By
Last change: Access without login.
Date: 8 years ago
Size: 748 bytes


Class file image Download
 * Receive all mail from Gmail Inbox example.
 * Created on 11-Nov-06.
 * @package gmTest
 * @author Vladislav Bailovic <malatestapunk@gmail.com>

include ('../gmatom.php');

$g = new GmAtom ('username''password');
$msgCount $g->check();
if (
false === $msgCount) {
    die (
} else {
"<h1>".$msgCount." messages</h1>";
    foreach (
$g->messages as $mid=>$msg) {
'<dt>'.$mid.': <B>'.$msg->from.'</b> '.$msg->subject.'</dt>';
'<dd>'.date('r'$msg->timestamp)." ({$msg->date})".'</dd>';
'<dd><a href="'.$msg->link.'">'.$msg->link.'</a></dd>';