Subject: | Unable to login |
I had to use the patch located at
http://unixbeard.net/svn/simon/Net-FS-Gmail/mail_webmail_gmail.patch
to log-in
I've also attached the patch.
Subject: | mail_webmail_gmail.patch |
--- /usr/local/perl580/lib/site_perl/5.8.0/Mail/Webmail/Gmail.pm 2006-03-10 16:11:00.000000000 +0000
+++ Gmail.pm 2006-03-22 16:30:10.000000000 +0000
@@ -102,7 +102,7 @@
if ( !$res->is_success() ) {
$self->{_error} = 1;
- $self->{_err_str} .= "Error: Could not login with those credentials\n";
+ $self->{_err_str} .= "Error: Could not login with those credentials - the request was not a success\n";
$self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n";
return;
}
@@ -110,7 +110,7 @@
update_tokens( $self, $res );
if ( $res->content() !~ /var url = "(.*?)"/ ) {
$self->{_error} = 1;
- $self->{_err_str} .= "Error: Could not login with those credentials\n";
+ $self->{_err_str} .= "Error: Could not login with those credentials - could not find final url\n";
$self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n";
return;
}
@@ -122,10 +122,10 @@
$req->header( 'Cookie' => $self->{_cookie} );
$res = $self->{_ua}->request( $req );
if ( $res->content() !~ /<a href="http:\/\/mail.google.com\/mail\?view=pr&fs=1" target="_blank"> Gmail <\/a>/ ) {
- $self->{_error} = 1;
- $self->{_err_str} .= "Error: Could not login with those credentials\n";
- $self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n";
- return;
+ #$self->{_error} = 1;
+ #$self->{_err_str} .= "Error: Could not login with those credentials - could not find find redirect url in \n\n".$res->content()."\n";
+ #$self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n";
+ # return;
}
update_tokens( $self, $res );
@@ -134,7 +134,7 @@
$res = $self->{_ua}->request( $req );
if ( $res->content() !~ /top.location="(.*?)"/ ) {
$self->{_error} = 1;
- $self->{_err_str} .= "Error: Could not login with those credentials\n";
+ $self->{_err_str} .= "Error: Could not login with those credentials - couldn't find top.location\n";
$self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n";
return;
}