Mail-Webmail-Gmail
view release on metacpan or search on metacpan
1.01 Sat Feb 7 01:29:00 2005
- Fixed proxy variable warnings ( Thank you Bas Couwenberg ).
- Fixed some mistakes in the documentation ( Thank you Barry D. Hassler ).
- Fixed error where results were limited by 'Maximum page size'
get_messages now returns all matched results. ( Thank you Jon Smith
and Christian Mendoza ).
- Updated documentation with new test scripts.
- Clarified how to delete from the spam folder.
- Added get_mime_email ( Thank you Marcelo E. Magallón ).
- Added get_contacts ( Thank you David Westbrook ).
- Added update_prefs.
1.00 Sat Sep 12 13:32:00 2004
- Fixed some errors in the documentation.
- Fixed an error where large message bodies were
not returned properly.
- Updated documentation with new test scripts.
- Added the ability to delete messages.
0.09 Thu Aug 12 22:14:00 2004
- Added a README.WINDOWS to help with the complexity of installing
print "All (Note: the All folder skips trash)";
$messages = $gmail->get_messages();
if ( @{ $messages } ) {
foreach ( @{ $messages } ) {
print "\t\t$_->{ 'subject' }\n";
}
}
###
### Update preferences
if ( $gmail->update_prefs( signature => 'Test Sig.', max_page_size => 100 ) ) {
print "Preferences Updated.\n";
} else {
print "Unable to update preferences.\n";
}
###
### Show all contact email addresses
my ( @contacts ) = @{ $gmail->get_contacts() };
foreach ( @contacts ) {
print $_->{ 'email' } . "\n";
lib/Mail/Webmail/Gmail.pm view on Meta::CPAN
if ( $res->is_success() ) {
my $attachment = $res->content();
return( \$attachment );
} else {
$self->{_error} = 1;
$self->{_err_str} .= "Error: While requesting attachment: '$res->{_request}->{_uri}'.\n";
return;
}
}
sub update_prefs {
my ( $self ) = shift;
my ( %args ) = (
view => 'tl',
act => 'prefs',
search => 'inbox',
@_, );
unless ( check_login( $self ) ) { return };
$args{ 'at' } = $self->{_cookies}->{GMAIL_AT};
my ( %pref_mappings ) = (
bx_hs => 'keyboard_shortcuts',
ix_nt => 'max_page_size',
lib/Mail/Webmail/Gmail.pm view on Meta::CPAN
keyboard_shortcuts = ( 0, 1 )
indicators = ( 0, 1 )
snippets = ( 0, 1 )
max_page_size = ( 25, 50, 100 )
display_name = ( '', string value up to 96 Characters )
reply_to = ( '', string value up to 320 Characters )
signature = ( '', string value up to 1000 Characters )
Changing preferences can be accomplished by simply sending the preference(s) that you want to change, and the new value.
$gmail->update_prefs( indicators => 0, reply_to => 'test@test.com' );
To delete display_name, reply_to, or signature simply send a blank string as in the following example.
$gmail->update_prefs( signature => '' );
=head2 STARRING A MESSAGE
To star or unstar a message use these examples
#star
$gmail->edit_star( action => 'add', 'msgid' => $msgid );
#unstar
$gmail->edit_star( action => 'remove', 'msgid' => $msgid );
lib/Mail/Webmail/Gmail.pm view on Meta::CPAN
print "All (Note: the All folder skips trash)";
$messages = $gmail->get_messages();
if ( @{ $messages } ) {
foreach ( @{ $messages } ) {
print "\t\t$_->{ 'subject' }\n";
}
}
###
### Update preferences
if ( $gmail->update_prefs( signature => 'Test Sig.', max_page_size => 100 ) ) {
print "Preferences Updated.\n";
} else {
print "Unable to update preferences.\n";
}
###
### Show all contact email addresses
my ( @contacts ) = @{ $gmail->get_contacts() };
foreach ( @contacts ) {
print $_->{ 'email' } . "\n";
( run in 1.204 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )