120 Part II — Getting Inside Gmail
Table 7-1 (continued)
Method
Function
GMailSnapshot get
To get a snapshot, an object (see GMailSnapshot below) for you
Snapshot(GM_CONSTANT
to access the query result at ease.
type)
bool getAttachment
To download an attachment of a message.
(string attachment_id,
string message_id,
string filename)
array getAttachmentsOf To download all files attached to a conversation. The full path of
(array GMailSnapshot-> downloaded files will be returned (as array).
conv, string path_to_
store_files)
bool send(string to,
To send Gmail. to, cc, and bcc are comma-separated addresses.
string subject,
attachments is an array of names of files to be attached.
string body, string cc,
string bcc,
string message_replying,
string thread_replying,
array attachments)
bool performAction
To perform an action on a message. message_id can be a string
(GM_CONSTANT action_
if only one message is to be acted.
type, array message_id,
string label)
void disconnect()
To disconnect from Gmail. Any cookies set at the client-side
browser by libgmailer will be removed.
string dump(string query) To dump all it gets from the URL query string, including headers.
array getStandardBox()
To get an array of names of the standard box (Inbox, Starred, and
so on).
Logging in with Gmailer
Logging into Gmail with the Gmailer library is very simple. First you point your
script to the library itself:
require(“libgmailer.php”);
Then you invoke the new Gmailer object:
$gm = new GMailer();
Table 7-1 (continued)
Method
Function
GMailSnapshot get
To get a snapshot, an object (see GMailSnapshot below) for you
Snapshot(GM_CONSTANT
to access the query result at ease.
type)
bool getAttachment
To download an attachment of a message.
(string attachment_id,
string message_id,
string filename)
array getAttachmentsOf To download all files attached to a conversation. The full path of
(array GMailSnapshot-> downloaded files will be returned (as array).
conv, string path_to_
store_files)
bool send(string to,
To send Gmail. to, cc, and bcc are comma-separated addresses.
string subject,
attachments is an array of names of files to be attached.
string body, string cc,
string bcc,
string message_replying,
string thread_replying,
array attachments)
bool performAction
To perform an action on a message. message_id can be a string
(GM_CONSTANT action_
if only one message is to be acted.
type, array message_id,
string label)
void disconnect()
To disconnect from Gmail. Any cookies set at the client-side
browser by libgmailer will be removed.
string dump(string query) To dump all it gets from the URL query string, including headers.
array getStandardBox()
To get an array of names of the standard box (Inbox, Starred, and
so on).
Logging in with Gmailer
Logging into Gmail with the Gmailer library is very simple. First you point your
script to the library itself:
require(“libgmailer.php”);
Then you invoke the new Gmailer object:
$gm = new GMailer();
