Subject: | Could not login with right username/password |
My code:
#!/usr/bin/perl -w
use strict;
use Mail::Webmail::Gmail;
my $username='rightlogin';
my $password='rightpass';
my $gmail = Mail::Webmail::Gmail->new(
username => $username,
password => $password
);
my $msg = $gmail->send_message(
to => $username . '@gmail.com',
subject => 'Test Message',
msgbody => 'This is a test.'
);
if ($gmail->error()) {
print $gmail->error_msg();
}
result:
Error: Could not login with those credentials - could not find final URL
Additionally, HTTP error: 200 OK
Error: Could not Login.