about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2003-05-20 11:21:31 +0000
committerGraham Barr <gbarr@pobox.com>2003-05-20 11:21:31 +0000
commitaa74f4ee6d37a3f2a1c1fe1668c14fdcd8345075 (patch)
tree2d04063d11a67994cecb9decd71edba1077ee8f2
parent0bb59690f5402f9054bbfbf911fe9968b656e440 (diff)
downloadperl-libnet-aa74f4ee6d37a3f2a1c1fe1668c14fdcd8345075.tar.gz
Net::SMTP
- Support MTAs with broken HELO response
  (patch from Michael Driscoll)

-rw-r--r--Net/SMTP.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/Net/SMTP.pm b/Net/SMTP.pm
index 8a7d2ed..1609ac8 100644
--- a/Net/SMTP.pm
+++ b/Net/SMTP.pm
@@ -16,7 +16,7 @@ use IO::Socket;
 use Net::Cmd;
 use Net::Config;
 
-$VERSION = "2.26"; # $Id: //depot/libnet/Net/SMTP.pm#29 $
+$VERSION = "2.26"; # $Id: //depot/libnet/Net/SMTP.pm#30 $
 
 @ISA = qw(Net::Cmd IO::Socket::INET);
 
@@ -168,9 +168,10 @@ sub hello
         if $ok = $me->_HELO($domain);
   }
 
- $ok && $msg[0] =~ /\A\s*(\S+)/
-        ? $1
-        : undef;
+ return undef unless $ok;
+
+ $msg[0] =~ /\A\s*(\S+)/;
+ return ($1 || " ");
 }
 
 sub supports {
@@ -761,6 +762,6 @@ it under the same terms as Perl itself.
 
 =for html <hr>
 
-I<$Id: //depot/libnet/Net/SMTP.pm#29 $>
+I<$Id: //depot/libnet/Net/SMTP.pm#30 $>
 
 =cut