ヤミRoot VoidGate
User / IP
:
216.73.216.33
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
perl5
/
man
/
man3
/
Viewing: Mail::Webmail::Gmail.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mail::Webmail::Gmail 3" .TH Mail::Webmail::Gmail 3 "2006-08-11" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Mail::Webmail::Gmail \- An interface to Google's webmail service .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # Perl script that logs in to Gmail, retrieves the user defined labels \& # Then prints out all new messages under the first label \& \& use Mail::Webmail::Gmail; \& \& my $gmail = Mail::Webmail::Gmail\->new( \& username => \*(Aqusername\*(Aq, password => \*(Aqpassword\*(Aq, \& ); \& \& my @labels = $gmail\->get_labels(); \& \& my $messages = $gmail\->get_messages( label => $labels[0] ); \& \& foreach ( @{ $messages } ) { \& if ( $_\->{ \*(Aqnew\*(Aq } ) { \& print "Subject: " . $_\->{ \*(Aqsubject\*(Aq } . " / Blurb: " . $_\->{ \*(Aqblurb\*(Aq } . "\en"; \& } \& } .Ve .SH "ABSTRACT" .IX Header "ABSTRACT" This perl module uses objects to make it easy to interface with Gmail. I eventually hope to implement all of the functionality of the Gmail website, plus additional features. .SH "DESCRIPTION" .IX Header "DESCRIPTION" Because Gmail is currently in Beta testing, expect this module to break as they make updates to thier interface. I will attempt to keep this module in line with the changes they make, but, if after updating to the newest version of this module, the feature that you require still doesn't work, please contact me with the issue. .SS "\s-1STARTING A NEW GMAIL SESSION\s0" .IX Subsection "STARTING A NEW GMAIL SESSION" The standard call for starting a new Gmail session is simply .PP .Vb 1 \& my $gmail = Mail::Webmail::Gmail\->new( username => \*(Aqusername\*(Aq, password => \*(Aqpassword\*(Aq, ); .Ve .PP This module does support the use of a proxy server .PP .Vb 4 \& my $gmail = Mail::Webmail::Gmail\->new( username => \*(Aqusername\*(Aq, password => \*(Aqpassword\*(Aq, \& proxy_username => \*(Aqproxy_username\*(Aq, \& proxy_password => \*(Aqproxy_password\*(Aq, \& proxy_name => \*(Aqproxy_server\*(Aq ); .Ve .PP By default, this module only encrypts the logon process. To encrypt the entire session, use the argument encrypt_session .PP .Vb 1 \& my $gmail = Mail::Webmail::Gmail\->new( username => \*(Aqusername\*(Aq, password => \*(Aqpassword\*(Aq, encrypt_session => 1 ); .Ve .PP After that, you are free to start making requests for data. .SS "\s-1RETRIEVING LABELS\s0" .IX Subsection "RETRIEVING LABELS" Returns an array of all user defined labels. .PP .Vb 1 \& my @labels = $gmail\->get_labels(); .Ve .SS "\s-1EDITING LABELS\s0" .IX Subsection "EDITING LABELS" There are five actions that can currently be preformed on labels. As a note, this module enforces Gmail's limits on label creation. A label cannot be over 40 characters, and a label cannot contain the character '^'. On failure, error and error_msg are set. .PP .Vb 2 \& #creating new labels. \& $gmail\->edit_labels( label => \*(Aqlabel_name\*(Aq, action => \*(Aqcreate\*(Aq ); \& \& #renaming existing labels. \& $gmail\->edit_labels( label => \*(Aqlabel_name\*(Aq, action => \*(Aqrename\*(Aq, new_name => \*(Aqrenamed_label\*(Aq ); \& \& #deleting labels. \& $gmail\->edit_labels( label => \*(Aqlabel_name\*(Aq, action => \*(Aqdelete\*(Aq ); \& \& #adding a label to a message. \& $gmail\->edit_labels( label => \*(Aqlabel_name\*(Aq, action => \*(Aqadd\*(Aq, msgid => $message_id ); \& \& #removing a label from a message. \& $gmail\->edit_labels( label => \*(Aqlabel_name\*(Aq, action => \*(Aqremove\*(Aq, msgid => $message_id ); .Ve .SS "\s-1UPDATING PREFERENCES\s0" .IX Subsection "UPDATING PREFERENCES" The following are the seven preferences and the allowed values that can currently be changed through Mail::Webmail::Gmail .PP .Vb 7 \& keyboard_shortcuts = ( 0, 1 ) \& indicators = ( 0, 1 ) \& snippets = ( 0, 1 ) \& max_page_size = ( 25, 50, 100 ) \& display_name = ( \*(Aq\*(Aq, string value up to 96 Characters ) \& reply_to = ( \*(Aq\*(Aq, string value up to 320 Characters ) \& signature = ( \*(Aq\*(Aq, string value up to 1000 Characters ) .Ve .PP Changing preferences can be accomplished by simply sending the preference(s) that you want to change, and the new value. .PP .Vb 1 \& $gmail\->update_prefs( indicators => 0, reply_to => \*(Aqtest@test.com\*(Aq ); .Ve .PP To delete display_name, reply_to, or signature simply send a blank string as in the following example. .PP .Vb 1 \& $gmail\->update_prefs( signature => \*(Aq\*(Aq ); .Ve .SS "\s-1STARRING A MESSAGE\s0" .IX Subsection "STARRING A MESSAGE" To star or unstar a message use these examples .PP .Vb 2 \& #star \& $gmail\->edit_star( action => \*(Aqadd\*(Aq, \*(Aqmsgid\*(Aq => $msgid ); \& \& #unstar \& $gmail\->edit_star( action => \*(Aqremove\*(Aq, \*(Aqmsgid\*(Aq => $msgid ); .Ve .SS "\s-1ARCHIVING\s0" .IX Subsection "ARCHIVING" To archive or unarchive a message use these examples .PP .Vb 2 \& #archive \& $gmail\->edit_archive( action => \*(Aqarchive\*(Aq, \*(Aqmsgid\*(Aq => $msgid ); \& \& #unarchive \& $gmail\->edit_archive( action => \*(Aqunarchive\*(Aq, \*(Aqmsgid\*(Aq => $msgid ); .Ve .SS "\s-1RETRIEVING MESSAGE LISTS\s0" .IX Subsection "RETRIEVING MESSAGE LISTS" By default, get_messages returns a reference to an AoH with the messages from the 'all' folder. To change this behavior you can either send a label .PP .Vb 1 \& my $messages = $gmail\->get_messages( label => \*(Aqwork\*(Aq ); .Ve .PP Or request a Gmail provided folder using one of the provided variables .PP .Vb 4 \& \*(AqINBOX\*(Aq \& \*(AqSTARRED\*(Aq \& \*(AqSPAM\*(Aq \& \*(AqTRASH\*(Aq \& \& Ex. \& \& my $messages = $gmail\->get_messages( label => $Mail::Webmail::Gmail::FOLDERS{ \*(AqINBOX\*(Aq } ); .Ve .PP The Array of hashes is in the following format .PP .Vb 9 \& $indv_email{ \*(Aqid\*(Aq } \& $indv_email{ \*(Aqnew\*(Aq } \& $indv_email{ \*(Aqstarred\*(Aq } \& $indv_email{ \*(Aqdate_received\*(Aq } \& $indv_email{ \*(Aqsender_email\*(Aq } \& $indv_email{ \*(Aqsubject\*(Aq } \& $indv_email{ \*(Aqblurb\*(Aq } \& @{ $indv_email{ \*(Aqlabels\*(Aq } } \& @{ $indv_email{ \*(Aqattachments\*(Aq } } .Ve .SS "\s-1SPACE REMAINING\s0" .IX Subsection "SPACE REMAINING" Returns a scalar with the amount of \s-1MB\s0 remaining in you account. .PP .Vb 1 \& my $remaining = $gmail\->size_usage(); .Ve .PP If called in list context, returns an array as follows. [ Used, Total, Percent Used ] [ \*(L"0 \s-1MB\*(R", \*(L"1000 MB\*(R", \s0\*(L"0%\*(R" ] .SS "\s-1INDIVIDUAL MESSAGES\s0" .IX Subsection "INDIVIDUAL MESSAGES" There are two ways to get an individual message: .PP .Vb 1 \& By sending a reference to a specific message returned by get_messages \& \& #prints out the message body for all messages in the starred folder \& my $messages = $gmail\->get_messages( label => $Mail::Webmail::Gmail::FOLDERS{ \*(AqSTARRED\*(Aq } ); \& foreach ( @{ $messages } ) { \& my $message = $gmail\->get_indv_email( msg => $_ ); \& print "$message\->{ $_\->{ \*(Aqid\*(Aq } }\->{ \*(Aqbody\*(Aq }\en"; \& } \& \& Or by sending a message ID and Label that the message resides in \& \& #retrieve specific email message for review \& my $msgid = \*(AqF000000000\*(Aq; \& my $message = $gmail\->get_indv_email( id => $msgid, label => \*(Aqlabel01\*(Aq ); \& print "$message\->{ $msgid }\->{ \*(Aqbody\*(Aq }\en"; .Ve .PP returns a Hash of Hashes containing the data from an individual message in the following format: .PP Hash of messages in thread by \s-1ID\s0 .PP .Vb 7 \& $indv_email{ \*(Aqid\*(Aq } \& $indv_email{ \*(Aqsender_email\*(Aq } \& $indv_email{ \*(Aqsent\*(Aq } \& $indv_email{ \*(Aqto\*(Aq } \& $indv_email{ \*(Aqread\*(Aq } \& $indv_email{ \*(Aqsubject\*(Aq } \& @{ $indv_email{ \*(Aqattachments\*(Aq } } \& \& #If it is the main message in the thread \& $indv_email{ \*(Aqbody\*(Aq } \& %{ $indv_email{ \*(Aqads\*(Aq } } = ( \& title => \*(Aq\*(Aq, \& body => \*(Aq\*(Aq, \& vendor_link => \*(Aq\*(Aq, \& link => \*(Aq\*(Aq, ); .Ve .SS "\s-1MIME MESSAGES\s0" .IX Subsection "MIME MESSAGES" This will return an individual message in \s-1MIME\s0 format. .PP .Vb 1 \& The parameters to this function are the same as get_indv_email. \& \& #prints out the MIME format for all messages in the inbox \& my $messages = $gmail\->get_messages( label => $Mail::Webmail::Gmail::FOLDERS{ \*(AqINBOX\*(Aq } ); \& foreach ( @{ $messages } ) { \& my $message = $gmail\->get_mime_email( msg => $_ ); \& print $message \& } \& \& returns a string that contains the MIME formatted email. .Ve .SS "\s-1RETRIEVING CONTACTS\s0" .IX Subsection "RETRIEVING CONTACTS" The get_contacts method returns a reference to an AoH with all of the Contacts. This can be limited to the 'Frequently Mailed' contacts with a flag: .PP .Vb 1 \& my $contacts = $gmail\->get_contacts( frequent => 1 ); .Ve .PP The Array of hashes is in the following format .PP .Vb 5 \& $indv_contact{ \*(Aqid\*(Aq } \& $indv_contact{ \*(Aqname1\*(Aq } \& $indv_contact{ \*(Aqname2\*(Aq } \& $indv_contact{ \*(Aqemail\*(Aq } \& $indv_contact{ \*(Aqnote\*(Aq } .Ve .SS "\s-1SENDING MAIL\s0" .IX Subsection "SENDING MAIL" The basic format of sending a message is .PP .Vb 1 \& $gmail\->send_message( to => \*(Aquser@domain.com\*(Aq, subject => \*(AqTest Message\*(Aq, msgbody => \*(AqThis is a test.\*(Aq ); .Ve .PP To send to multiple users, send an arrayref containing all of the users .PP .Vb 5 \& my $email_addrs = [ \& \*(Aquser1@domain.com\*(Aq, \& \*(Aquser2@domain.com\*(Aq, \& \*(Aquser3@domain.com\*(Aq, ]; \& $gmail\->send_message( to => $email_addrs, subject => \*(AqTest Message\*(Aq, msgbody => \*(AqThis is a test.\*(Aq ); .Ve .PP You may also send mail using cc and bcc. .PP To attach files to a message .PP .Vb 1 \& $gmail\->send_message( to => \*(Aquser@domain.com\*(Aq, subject => \*(AqTest Message\*(Aq, msgbody => \*(AqThis is a test.\*(Aq, file0 => ["/tmp/foo"], file1 => ["/tmp/bar"] ); .Ve .SS "\s-1DELETE MESSAGES\s0" .IX Subsection "DELETE MESSAGES" Use the following to move a message to the trash bin .PP .Vb 1 \& $gmail\->delete_message( msgid => $msgid, del_message => 0 ); .Ve .PP To permanently delete a message, just send a msgid .PP .Vb 1 \& $gmail\->delete_message( msgid => $msgid ); .Ve .SS "\s-1ACTING ON MULTIPLE MESSAGES\s0" .IX Subsection "ACTING ON MULTIPLE MESSAGES" To act on multiple messages at once send an array ref containing all of the message IDs you with to act on. This is useful because Gmail may temporarily ban you if you send too much traffic in a short amount of time (for instance deleting all of the messaging in your \s-1SPAM\s0 folder one at a time). .PP .Vb 2 \& ### Delete Many Messages at once ### \& $gmail\->delete_message( msgid => \e@msgids, search => \*(Aqspam\*(Aq, del_message => 1 ); \& \& ### Applying a label to multiple messages at once ### \& $gmail\->edit_labels( label => \*(Aqlabel_name\*(Aq, action => \*(Aqadd\*(Aq, msgid => \e@msgids ); .Ve .SS "\s-1GETTING ATTACHMENTS\s0" .IX Subsection "GETTING ATTACHMENTS" There are two ways to get an attachment: .PP .Vb 1 \& By sending a reference to a specific attachment returned by get_indv_email \& \& #creates an array of references to every attachment in your account \& my $messages = $gmail\->get_messages(); \& my @attachments; \& \& foreach ( @{ $messages } ) { \& my $email = $gmail\->get_indv_email( msg => $_ ); \& if ( defined( $email\->{ $_\->{ \*(Aqid\*(Aq } }\->{ \*(Aqattachments\*(Aq } ) ) { \& foreach ( @{ $email\->{ $_\->{ \*(Aqid\*(Aq } }\->{ \*(Aqattachments\*(Aq } } ) { \& push( @attachments, $gmail\->get_attachment( attachment => $_ ) ); \& if ( $gmail\->error() ) { \& print $gmail\->error_msg(); \& } \& } \& } \& } \& \& Or by sending the attachment ID and message ID \& \& #retrieve specific attachment \& my $msgid = \*(AqF000000000\*(Aq; \& my $attachid = \*(Aq0.1\*(Aq; \& my $attach_ref = $gmail\->get_attachment( attid => $attachid, msgid => $msgid ); .Ve .PP Returns a reference to a scalar that holds the data from the attachment. .SH "SAMPLE GMAIL OUTPUT" .IX Header "SAMPLE GMAIL OUTPUT" This is included so you can get an idea of what the underlying \s-1HTML\s0 looks like for Gmail. It is also included to somewhat document what the current interface needs to manipulate to extract data from Gmail. .PP .Vb 10 \& <html><head><meta content="text/html; charset=UTF\-8" http\-equiv="content\-type"></head> \& <script>D=(top.js&&top.js.init)?function(d){top.js.P(window,d)}:function(){}; \& if(window==top){top.location=\*(Aq/gmail?search=inbox&view=tl&start=0&init=1&zx=VERSION + RANDOM 9 DIGIT NUMBER&fs=1\*(Aq;} \& </script><script><!\-\- \& D(["v","fc5985703d8fe4f8"] \& ); \& D(["p",["bx_hs","1"] \& ,["bx_show0","1"] \& ,["bx_sc","1"] \& ,["sx_dn","username"] \& ] \& ); \& D(["i",0] \& ); \& D(["qu","0 MB","1000 MB","0%","#006633"] \& ); \& D(["ds",1,0,0,0,0,0] \& ); \& D(["ct",[["label 1",1] \& ,["label 2",0] \& ,["label 3",1] \& ] \& ] \& ); \& D(["ts",0,50,10,0,"Inbox","",13] \& ); \& D(["t",["MSG ID",1,0,"\e<b\e>12:53am\e</b\e>","\e<span id=\e\*(Aq_user_sender@domain.com\e\*(Aq\e>Sender Name\e</span\e> \& ","\e<b\e>»\e</b\e> ","\e<b\e>Subject\e</b\e>","Blurb …",["label1","label 2"] \& ,"attachment name1, attachment name2","MSG ID",0] \& ] \& ); \& \& D(["te"]); \& \& //\-\-></script><script>var fp=\*(Aq\*(Aq;</script><script>var loaded=true;D([\*(Aqe\*(Aq]);</script> .Ve .SH "SAMPLE TEST SCRIPTS" .IX Header "SAMPLE TEST SCRIPTS" below is a listing of some of the tests that I use as I test various features .PP \&\s-1SAMPLE USAGE\s0 .PP .Vb 2 \& my ( $gmail ) = Mail::Webmail::Gmail\->new( \& username => \*(Aqusername\*(Aq, password => \*(Aqpassword\*(Aq, ); \& \& ### Test Sending Message #### \& my $msgid = $gmail\->send_message( to => \*(Aqmincus@gmail.com\*(Aq, subject => time(), msgbody => \*(AqTest\*(Aq ); \& if ( $msgid ) { \& print "Msgid: $msgid\en"; \& if ( $gmail\->error() ) { \& print $gmail\->error_msg(); \& } else { \& ### Create new label ### \& my $test_label = "tl_" . time(); \& $gmail\->edit_labels( label => $test_label, action => \*(Aqcreate\*(Aq ); \& if ( $gmail\->error() ) { \& print $gmail\->error_msg(); \& } else { \& ### Add this label to our new message ### \& $gmail\->edit_labels( label => $test_label, action => \*(Aqadd\*(Aq, \*(Aqmsgid\*(Aq => $msgid ); \& if ( $gmail\->error() ) { \& print $gmail\->error_msg(); \& } else { \& print "Added label: $test_label to message $msgid\en"; \& } \& } \& } \& } else { \& if ( $gmail\->error() ) { \& print $gmail\->error_msg(); \& } \& } \& ### \& \& ### Move message to trash ### \& my $msgid = $gmail\->send_message( to => \*(Aqtestuser@test.com\*(Aq, subject => "del_" . time(), msgbody => \*(AqTest Delete\*(Aq ); \& if ( $gmail\->error() ) { \& print $gmail\->error_msg(); \& } else { \& $gmail\->delete_message( msgid => $msgid, del_message => 0 ); \& if ( $gmail\->error() ) { \& print $gmail\->error_msg(); \& } else { \& print "MSG: $msgid moved to trash\en"; \& } \& } \& ### \& \& ### Delete all SPAM folder messages ### \& my $messages = $gmail\->get_messages( label => $Mail::Webmail::Gmail::FOLDERS{ \*(AqSPAM\*(Aq } ); \& if ( @{ $messages } ) { \& my @msgids; \& foreach ( @{ $messages } ) { \& push( @msgids, $_\->{ \*(Aqid\*(Aq } ); \& } \& $gmail\->delete_message( msgid => \e@msgids, search => \*(Aqspam\*(Aq, del_message => 1 ); \& if ( $gmail\->error() ) { \& print $gmail\->error_msg(); \& } else { \& print "Deleted " . @msgids . " Messages\en"; \& } \& } \& ### \& \& ### Print out all user defined labels \& my @labels = $gmail\->get_labels(); \& foreach ( @labels ) { \& print "Label: \*(Aq" . $_ . "\*(Aq\en"; \& } \& ### \& \& ### Prints out all _New_ messages attached to the first label \& my @labels = $gmail\->get_labels(); \& unless ( $gmail\->error() ) { \& my $messages = $gmail\->get_messages( label => $labels[0] ); \& unless( $gmail\->error() ) { \& if ( defined( $messages ) ) { \& foreach ( @{ $messages } ) { \& if ( $_\->{ \*(Aqnew\*(Aq } ) { \& print "Subject: " . $_\->{ \*(Aqsubject\*(Aq } . " / Blurb: " . $_\->{ \*(Aqblurb\*(Aq } . "\en"; \& } \& } \& } \& } else { \& print $gmail\->error_msg(); \& } \& } else { \& print $gmail\->error_msg(); \& } \& ### \& \& ### Prints out all attachments \& my $messages = $gmail\->get_messages(); \& \& foreach ( @{ $messages } ) { \& my $email = $gmail\->get_indv_email( msg => $_ ); \& if ( defined( $email\->{ $_\->{ \*(Aqid\*(Aq } }\->{ \*(Aqattachments\*(Aq } ) ) { \& foreach ( @{ $email\->{ $_\->{ \*(Aqid\*(Aq } }\->{ \*(Aqattachments\*(Aq } } ) { \& print ${ $gmail\->get_attachment( attachment => $_ ) } . "\en"; \& if ( $gmail\->error() ) { \& print $gmail\->error_msg(); \& } \& } \& } \& } \& ### \& \& ### Prints out the vendor link from Ads attached to a message \& my $messages = $gmail\->get_messages( label => $Mail::Webmail::Gmail::FOLDERS{ \*(AqINBOX\*(Aq } ); \& \& foreach ( @{ $messages } ) { \& print "ID: " . $_\->{ \*(Aqid\*(Aq } . "\en"; \& my %email = %{ $gmail\->get_indv_email( msg => $_ ) }; \& if ( $email{ $_\->{ \*(Aqid\*(Aq } }\->{ \*(Aqads\*(Aq } ) { \& my $ads; \& foreach $ads ( @{ $email{ $_\->{ \*(Aqid\*(Aq } }\->{ \*(Aqads\*(Aq } } ) { \& print " \- AD LINK: $ads\->{vendor_link}\en"; \& } \& } \& } \& ### \& \& ### Shows different ways to look through your email \& my $messages = $gmail\->get_messages(); \& \& print "By folder\en"; \& foreach ( keys %Mail::Webmail::Gmail::FOLDERS ) { \& print "KEY: $_\en"; \& my $messages = $gmail\->get_messages( label => $Mail::Webmail::Gmail::FOLDERS{ $_ } ); \& print "\et$_:\en"; \& if ( @{ $messages } ) { \& foreach ( @{ $messages } ) { \& print "\et\et$_\->{ \*(Aqsubject\*(Aq }\en"; \& } \& } \& } \& \& print "By label\en"; \& foreach ( $gmail\->get_labels() ) { \& $messages = $gmail\->get_messages( label => $_ ); \& print "\et$_:\en"; \& if ( defined( $messages ) ) { \& if ( @{ $messages } ) { \& foreach ( @{ $messages } ) { \& print "\et\et$_\->{ \*(Aqsubject\*(Aq }\en"; \& } \& } \& } \& } \& \& print "All (Note: the All folder skips trash)"; \& $messages = $gmail\->get_messages(); \& if ( @{ $messages } ) { \& foreach ( @{ $messages } ) { \& print "\et\et$_\->{ \*(Aqsubject\*(Aq }\en"; \& } \& } \& ### \& \& ### Update preferences \& if ( $gmail\->update_prefs( signature => \*(AqTest Sig.\*(Aq, max_page_size => 100 ) ) { \& print "Preferences Updated.\en"; \& } else { \& print "Unable to update preferences.\en"; \& } \& ### \& \& ### Show all contact email addresses \& my ( @contacts ) = @{ $gmail\->get_contacts() }; \& foreach ( @contacts ) { \& print $_\->{ \*(Aqemail\*(Aq } . "\en"; \& } \& ### \& \& ### Print out space remaining in mailbox \& my $remaining = $gmail\->size_usage(); \& print "Remaining: \*(Aq" . $remaining . "\*(Aq\en"; \& ### .Ve .SH "AUTHOR INFORMATION" .IX Header "AUTHOR INFORMATION" Copyright 2004\-2005, Allen Holman. All rights reserved. .PP .Vb 4 \& This program is free software; you can redistribute it and/or modify \& it under the terms of the GNU General Public License as published by \& the Free Software Foundation; either version 2 of the License, or \& (at your option) any later version. \& \& This program is distributed in the hope that it will be useful, \& but WITHOUT ANY WARRANTY; without even the implied warranty of \& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \& GNU General Public License for more details. \& \& You should have received a copy of the GNU General Public License \& along with this program; if not, write to the Free Software \& Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307 USA .Ve .PP Address bug reports and comments to: email: mincus \eat cpan \e. org \&\s-1AIM:\s0 mincus c03 Website: http://code.mincus.com .PP When sending bug reports, please provide the version of Gmail.pm, the version of Perl and the name and version of the operating system you are using. .SH "CREDITS" .IX Header "CREDITS" I'd like to thank the following people who gave me a little direction in getting this module started (whether they know it or not) .IP "Simon Drabble (Mail::Webmail::Yahoo)" 4 .IX Item "Simon Drabble (Mail::Webmail::Yahoo)" .PD 0 .IP "Erik F. Kastner (WWW::Scraper::Gmail)" 4 .IX Item "Erik F. Kastner (WWW::Scraper::Gmail)" .IP "Abiel J. (C# Gmail \s-1API \-\s0 http://www.migraineheartache.com/)" 4 .IX Item "Abiel J. (C# Gmail API - http://www.migraineheartache.com/)" .IP "Daniel Stutz (http://www.use\-strict.net)" 4 .IX Item "Daniel Stutz (http://www.use-strict.net)" .PD .SH "BUGS" .IX Header "BUGS" Please report them.
Coded With 💗 by
0x6ick