diff options
author | Graham Barr <gbarr@pobox.com> | 1998-05-24 19:37:32 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 1998-05-24 19:37:32 +0000 |
commit | 19ef9b7df0014eb4385c1fc3ac30b1ed74ccfcf4 (patch) | |
tree | 75efb7790e1f95920e6146937e8ea1fecebcc13d | |
parent | 8587346e9452f2df5061b68390dfe7e6f11254e3 (diff) | |
download | perl-libnet-19ef9b7df0014eb4385c1fc3ac30b1ed74ccfcf4.tar.gz |
Net::SMTP
- Added banner() method
-rw-r--r-- | Net/SMTP.pm | 15 |
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 |