Perl Gmail Checker
I've never really played with perl in great detail... Normally love playing with php :D
Gmail Checker
This basically checks gmail for new messages
and with that it notifies you with a sound event :)
you can specify what sound you want...
I recommend using strawberry perl for windows :)
#!/usr/bin/perl -w
use Win32::Sound;
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$req = HTTP::Request->new(GET => 'https://mail.google.com/feed/atom');
$req->authorization_basic('username', 'passhere');
my $res = $ua->request($req);
if ($res->is_success) {
my $content = substr $res->content, 207, 1;
if ($content > 0)
{
Win32::Sound::play("email.wav");
print "New Mail";
}
else {
print "No Mail here";
}
}
exit 0;
Submitted: 2010-05-02
Posted By: Edd
