Subject: | Gmail and QUIT command |
Date: | Wed, 01 Oct 2008 17:56:44 +0200 |
To: | bug-Email-Send-SMTP-TLS [...] rt.cpan.org |
From: | Mike Collinson <mike [...] ayeltd.biz> |
When Email::Send::SMTP::TLS sends the SMTP QUIT command, Gmail appears to just disconnect and sends an empty response rather than sending back a 221 response expected by Email::Send::SMTP::TLS, resulting in this error:
Use of uninitialized value in pattern match (m//) at /usr/local/share/perl/5.8.8/Net/SMTP/TLS.pm line 140, <GEN0> line 7.
Use of uninitialized value in numeric eq (==) at /usr/local/share/perl/5.8.8/Net/SMTP/TLS.pm line 396, <GEN0> line 7.
Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.8.8/Net/SMTP/TLS.pm line 397, <GEN0> line 7.
Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.8.8/Net/SMTP/TLS.pm line 397, <GEN0> line 7.
Error sending email: An error occurred disconnecting from the mail server:
at /usr/local/share/perl/5.8.8/Email/Send/SMTP/TLS.pm line 60
Environment:
Net::SMTP::TLS - Version 0.12
perl, v5.8.8 built for i486-linux-gnu-thread-multi
Kubuntu
uname -a : Linux collectorm 2.6.24-19-generic #1 SMP Fri Jul 11 23:41:49 UTC 2008 i686 GNU/Linux
Ubuntu 8.04.1, kernel 2.6.24-19-generic
Fix:
I made these two crude changes below to get it to work, I am sure it could be improved:
sub quit:
if(not $num == 221){
-->
if($num && not $num == 221){
sub _response
Added:
unless (defined $line) {return ('','','')}
Thanks for making this module available!
Regards,
Mike Collinson