about summary refs log tree commit
diff options
context:
space:
mode:
-rw-r--r--Net/SMTP.pm15
1 files changed, 14 insertions, 1 deletions
diff --git a/Net/SMTP.pm b/Net/SMTP.pm
index b00a2b4..ba949e9 100644
--- a/Net/SMTP.pm
+++ b/Net/SMTP.pm
@@ -16,7 +16,7 @@ use IO::Socket;
 use Net::Cmd;
 use Net::Config;
 
-$VERSION = "2.11"; # $Id: //depot/libnet/Net/SMTP.pm#6 $
+$VERSION = "2.12"; # $Id: //depot/libnet/Net/SMTP.pm#7 $
 
 @ISA = qw(Net::Cmd IO::Socket::INET);
 
@@ -56,6 +56,7 @@ sub new
 
  ${*$obj}{'net_smtp_host'} = $host;
 
+ (${*$obj}{'net_smtp_banner'}) = $obj->message;
  (${*$obj}{'net_smtp_domain'}) = $obj->message =~ /\A\s*(\S+)/;
 
  unless($obj->hello($arg{Hello} || ""))
@@ -71,6 +72,13 @@ sub new
 ## User interface methods
 ##
 
+sub banner
+{
+ my $me = shift;
+
+ return ${*$me}{'net_smtp_banner'} || undef;
+}
+
 sub domain
 {
  my $me = shift;
@@ -446,6 +454,11 @@ empty list.
 
 =over 4
 
+=item banner ()
+
+Returns the banner message which the server replied with when the
+initial connection was made.
+
 =item domain ()
 
 Returns the domain that the remote SMTP server identified itself as during