131
Chapter 7 — Gmail Libraries
Function
What It Does
send_message( to =>
Sends a message to a single recipient.
‘user@domain.com’,
To send to multiple users, send an arrayref containing all of the
subject => ‘Test Message’, users:
msgbody => ‘This is
a test.’ );
my $email_addrs = [
‘user1@domain.com’,
‘user2@domain.com’,
‘user3@domain.com’, ];
$gmail->send_message( to => $email_addrs,
subject => ‘Test Message’, msgbody => ‘This is a
test.’ );
send_message( to =>
Sends a message with an attachment.
‘user@domain.com’,
subject => ‘Test Message’,
msgbody => ‘This is a
test.’, file0 => [“/tmp/
foo”], file1 => [“/tmp/
bar”] );
delete_message
Sends a message to the Trash.
( msgid => $msgid, del_
message => 0 );
delete_message( msgid => Permanently deletes the message.
$msgid );
The rest of this module is covered in Chapter 8 onwards.
Python — Libgmail
The trifecta of scripting languages beginning with P ends with ython, and is completed by Libgmail, the Python bindings for Gmail access.
Getting and Installing the Library
Libgmail is hosted on Sourceforge at http://Libgmail.sourceforge.net/
and can be downloaded directly from there. The authors of Libgmail advise using
the version from CVS if possible, as it is more likely to work with whatever
changes Google has made to the service lately. Figure 7-3 gives the traditional
screenshot of the project’s homepage.
Chapter 7 — Gmail Libraries
Function
What It Does
send_message( to =>
Sends a message to a single recipient.
‘user@domain.com’,
To send to multiple users, send an arrayref containing all of the
subject => ‘Test Message’, users:
msgbody => ‘This is
a test.’ );
my $email_addrs = [
‘user1@domain.com’,
‘user2@domain.com’,
‘user3@domain.com’, ];
$gmail->send_message( to => $email_addrs,
subject => ‘Test Message’, msgbody => ‘This is a
test.’ );
send_message( to =>
Sends a message with an attachment.
‘user@domain.com’,
subject => ‘Test Message’,
msgbody => ‘This is a
test.’, file0 => [“/tmp/
foo”], file1 => [“/tmp/
bar”] );
delete_message
Sends a message to the Trash.
( msgid => $msgid, del_
message => 0 );
delete_message( msgid => Permanently deletes the message.
$msgid );
The rest of this module is covered in Chapter 8 onwards.
Python — Libgmail
The trifecta of scripting languages beginning with P ends with ython, and is completed by Libgmail, the Python bindings for Gmail access.
Getting and Installing the Library
Libgmail is hosted on Sourceforge at http://Libgmail.sourceforge.net/
and can be downloaded directly from there. The authors of Libgmail advise using
the version from CVS if possible, as it is more likely to work with whatever
changes Google has made to the service lately. Figure 7-3 gives the traditional
screenshot of the project’s homepage.
