* Create your FREE website now *

GmCurlConnection

Tags:  

Class GmCurlConnection

This class creates and populates curl connection.

Properties

Private

$_connectUrl - Gmail Atom feed url.
$_label - Gmail label to check. This will be appended to $_connectUrl. Defaults to (bool)false
$_gmBox - Curl ressource.
$_result - Raw result feed.

Public

$username - Gmail username
$password - Password for the user

Methods

GmCurlConnection ($user=false, $pass=false)

Constructor.

Username and password parameters are optional at this point, but then you have to provide them later with setLoginInfo() method. Parameter $user is Gmail username (no '@gmail.com'), and $pass is password for the user.

(public) setLoginInfo ($user, $pass)

Sets login info for the user.

You may want to use this method to check multiple user gmailboxes.

You have to use this method if you haven't supplied username/password in constructor.

(public) setLabel ($label)

Sets Gmail label to check.

Use this to check the contents of a particular label.

With no label set, all new mail from Gmail inbox is checked.

(protected) connect ()

Creates and populates curl connection.

You shouldn't call this function yourself.

(protected) scrubConnection ()

Destroys connection and deletes result cache.


0 Comments
Post a comment



 RSS of this page

Written by:   Written by:   Version:   Last Edited By:   Modified