Forwarding or fetching your hotmail

This entry was posted by Tuesday, 7 April, 2009
Read the rest of this entry »

#!/usr/bin/perl -w
#
# You need to install this perl module below and openssl, crypt, mechanize also
use WWW::Hotmail;

my $hotmail = WWW::Hotmail->new();

$hotmail->login(‘username@hotmail.com’, “pass123”)
or die $WWW::Hotmail::errstr;

my @msgs = $hotmail->messages();
die $WWW::Hotmail::errstr if ($!);

print “You have “.scalar(@msgs).” messages\n”;

for (@msgs) {
print “message from “.$_->from.”\n”;
# retrieve the message from hotmail
my $mail = $_->retrieve;
# deliver it locally – you may wanna hash this out 🙂
$mail->accept;
# forward the message
$mail->resend(‘username@gmail.com’);
# delete it from the inbox
$_->delete;
}

Be Sociable, Share!

Leave a Reply



Time limit is exhausted. Please reload CAPTCHA.