Skip Menu |

This queue is for tickets about the Net-SMTP-TLS CPAN distribution.

Report information
The Basics
Id: 39827
Status: new
Priority: 0/
Queue: Net-SMTP-TLS

People
Owner: Nobody in particular
Requestors: jonathan [...] buhacoff.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.12
Fixed in: 0.12



Subject: working with rude mail servers
When using this module to send mail through gmail.com, I receive errors like this: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/Net/SMTP/TLS.pm line 140, <GEN0> line 7. Use of uninitialized value in numeric eq (==) at /usr/lib/perl5/site_perl/5.8.8/Net/SMTP/TLS.pm line 396, <GEN0> line 7. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/Net/SMTP/TLS.pm line 397, <GEN0> line 7. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/Net/SMTP/TLS.pm line 397, <GEN0> line 7. An error occurred disconnecting from the mail server: Even though there are errors, the message is sent successfully. I watched the smtp conversation and these errors happen immediately after the client sends the QUIT command. Apparently gmail.com disconnects immediately instead of replying with code 221. I fixed it for my system with the following two changes: Line 139: add || "" to the end of the line immediately before the semicolon. So the revised line looks like this: my $line = $me->{sock}->getline() || ""; Line 395: add || (221,"") to the end of the line immediately before the semicolon. So the revised line looks like this: my ($num, $txt) = $me->_response() || (221,""); Assuming code 221 is probably not a great idea but maybe you can make the module a little more robust, so that if we're at QUIT and the server disconnects we don't throw an error... maybe a warning instead ?