Hacking Gmail
Chapter 9 — Reading Mail 157 my $body = $message->{ $_->{‘id’} }->{‘body’} || “Body irretrievable”; $rss->add_item( ...
158 Part II — Getting Inside Gmail By this point in the script, you have logged in. Now to retrieve the messages in the Inbox: m ...
Chapter 9 — Reading Mail 159 author => “$sender_email”, description => “$body”, ); That’s all quite self-explanatory, exce ...
...
Sending Mail N ow that you know how to read the mail in your Inbox with your own programs, it’s time to move on to replying to t ...
162 Part II — Getting Inside Gmail One other advantage of using the Gmail SMTP client is that any mail sent via the SMTP gateway ...
Chapter 10 — Sending Mail 163 Listing 10-1: Sending Mail with Perl use Utils; $gmail = login(); input data from keyboard print “ ...
164 Part II — Getting Inside Gmail Listing 10-2 (continued) foreach ( @{$messages} ) { if ( $_->{“new”} ) { print $id. “\t” . ...
Chapter 10 — Sending Mail 165 You then grab all of the messages in the Inbox and set up some variables you shall use to keep tra ...
166 Part II — Getting Inside Gmail ); # we are using sender and subject from the original message print “message sent\n”; } This ...
Conquering Gmail Y ou’re the man! You’ve learned how to use Gmail to its fullest, and now you’re writing scripts that use scrape ...
16_59611x pt03.qxp 11/28/05 11:05 PM Page 168 ...
Dealing with Labels Y ou can receive mail and you can send mail, but you have yet to play with Gmail’s main feature — its immens ...
170 Part III — Conquering Gmail Listing 11-1: Getting the Existing Labels use Utils; $gmail = login(); @labels = $gmail->get_ ...
Chapter 11 — Dealing with Labels 171 print $_->{“sender_email”}. “\t” . stripbold( $->{“subject”} ) . “\n”; } } The import ...
172 Part III — Conquering Gmail Listing 11-3 (continued) } print “\n”; print “enter label number to retrive labeled messages:\n” ...
Chapter 11 — Dealing with Labels 173 This is exactly the same technique as you used in Listing 11-2, added to Chapter 10’s metho ...
174 Part III — Conquering Gmail Listing 11-4 (continued) $message = @{$messages}[ $nums[ $num - 1 ] ]; $msgid = $message->{“i ...
Chapter 11 — Dealing with Labels 175 Creating a New Label The creation of new labels is done with the same edit_labelsfunction, ...
176 Part III — Conquering Gmail Listing 11-5 (continued) print “\n”; $label = $labels[ $num - 1 ]; if ($label) { $messages = $gm ...
«
5
6
7
8
9
10
11
12
13
14
»
Free download pdf