NAME
REST::Google::Apps::EmailSettings - A Perl library to Google's RESTful Apps API
SYNOPSIS
use REST::Google::Apps::EmailSettings
$google = REST::Google::Apps::EmailSettings->new(
domain => 'company.com',
username => 'admin',
password => 'g00gl34pp5!'
);
$user->{'jsmith'} = $google->enableForwarding(
username => 'jsmith',
forwardTo => 'joe@example.net'
);
DESCRIPTION
REST::Google::Apps::EmailSettings provides a Perl interface to Google's RESTful Apps API.
This module is currently a work-in-progress. Please e-mail with problems, bug fixes, comments and complaints.
CONSTRUCTOR
- new ( DOMAIN, USERNAME, PASSWORD )
-
Creates a new REST::Google::Apps::EmailSettings object. A domain parameter is required.
Supplying authentication information to the constructor is optional , but needs to happen either here or with a call to the authenticate method.
Example
$google = REST::Google::Apps::EmailSettings->new( domain => 'company.com', username => 'admin', password => 'g00gl34pp5!' );
METHODS
- authenticate ( USERNAME, PASSWORD )
-
Authenticate a session.
Example
$google->authenticate( username => 'admin', password => 'g00gl34pp5!' ) || die "Could not authenticate";
- createLabel ( USERNAME, LABEL )
-
Create a new label.
Example
$google->createLabel( username => 'jsmith', label => 'Receipts' ) || die "Could not create label";
- enableWebClips ( USERNAME )
- disableWebClips ( USERNAME )
-
Enable or disable web clips.
Example
$google->enableWebClips( 'jsmith' );
- enableForwarding ( USERNAME, FORWARDTO, ACTION )
-
Enable forwarding.
action is an optional parameter defining what Google should do with mail once forwarding is enabled. Valid options are 'archive', 'keep' (the default), and 'delete'.
Example
$google->enableForwarding( username => 'jsmith', forwareTo => 'joe@example.net', action => 'archive' ) || die "Could not enable forwarding";
- disableForwarding ( USERNAME )
-
Disable forwarding.
Example
$google->disableForwarding( 'jsmith' );
- enablePOP ( USERNAME, ENABLEFOR, ACTION )
-
Enable POP access.
action is an optional parameter defining what Google should do with mail once POP access is enabled. Valid options are 'archive', 'keep' (the default), and 'delete'.
enableFor is an optional parameter defining whether to enable POP for all mail, or mail from now on. Valid options are 'all', and 'now' (the default).
Example
$google->enablePOP( username => 'jsmith', enableFor => 'all', action => 'archive' ) || die "Could not enable POP";
- disablePOP ( USERNAME )
-
Disable POP access.
Example
$google->disablePOP( 'jsmith' );
- enableIMAP ( USERNAME )
- disableIMAP ( USERNAME )
-
Enable or disable IMAP access.
Example
$google->enableIMAP( 'jsmith' );
AUTHOR
Scott Schneider <sschneid@gmail.com>
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 115:
'=item' outside of any '=over'
- Around line 146:
'=item' outside of any '=over'
- Around line 156:
You forgot a '=back' before '=head1'