Subject: | does not handle new Gmail 'Access for Less Secure Apps' == no option |
At http://www.google.com/settings/security/lesssecureapps
you now have a choice of :
Access for less secure apps
Turn off o
Turn on o
When 'Turn off' is selected (the default), Net::IMAP::Client v0.9505 cannot login :
<quote><pre>
$ perl -e <<'EOF'
use Net::IMAP::Client;
my $imap = Net::IMAP::Client->new(
server => 'imap.gmail.com',
user => 'jason.vas.dias@gmail.com',
pass => 'JVD66gmail',
ssl => 1, # (use SSL? default no)
ssl_verify_peer => 0, # (use ca to verify server, default yes)
# ssl_ca_file => '/etc/ssl/certs/certa.pm', # (CA file used for verify server) or
# ssl_ca_path => '/etc/ssl/certs/', # (CA path used for SSL)
port => 993 # (but defaults are sane)
) or die "Could not connect to IMAP server";
# # everything's useless if you can't login
$imap->login or
die('Login failed: ' . $imap->last_error);
EOF
Login failed: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure) at imap.pl line 19.
$
</pre></quote>
When 'Turn on' is selected, you get a TXT message from Google,
but then the above script fragment succeeds .
I'd really like to know what whacky new authentication protocol
we must support to get IMAP login to succeed -
please, can anyone enlighten me what this is ?
Is it because we do not identify as a recognized mail client?
Any pointers much appreciated! Thanks, Jason
Any idea what