Subject: | Can't read emails |
Date: | Thu, 12 Nov 2009 18:15:38 +0530 |
To: | bug-Mail-Webmail-Gmail [...] rt.cpan.org |
From: | Anshul Malik <anshulmalik1987 [...] gmail.com> |
Hi,
Using the following perl code I am not able to get the emails residing at my
Gmail account.
#!/usr/bin/perl
use Mail::Webmail::Gmail;
my $gmail = Mail::Webmail::Gmail->new( username => '*myusername*', password
=> '*mypassword*');
my @labels=$gmail->get_labels();
my $messages = $gmail->get_messages(label => $Mail::Webmail::Gmail::FOLDERS{
'INBOX' });
foreach(@{ $messages })
{print "hi";
if($_->{'new'})
{
print "Subject:".$_->{'subject'}." / Blurb: ".$_->{'blurb'};
}
}
It doesnt even go inside the foreach (as i printed a "hi" in the code to
test that). Please tell me what can I do. Thank You
Regards
Anshul