From 8a099f7243940f8e41a6893e2f635e6e75428a3f Mon Sep 17 00:00:00 2001 From: Graham Barr Date: Fri, 22 Feb 2002 14:57:42 +0000 Subject: Net::SMTP - Support binding to a local port/address --- Net/SMTP.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Net/SMTP.pm b/Net/SMTP.pm index bae5835..e5d2d4c 100644 --- a/Net/SMTP.pm +++ b/Net/SMTP.pm @@ -16,7 +16,7 @@ use IO::Socket; use Net::Cmd; use Net::Config; -$VERSION = "2.19"; # $Id: //depot/libnet/Net/SMTP.pm#20 $ +$VERSION = "2.20"; # $Id: //depot/libnet/Net/SMTP.pm#21 $ @ISA = qw(Net::Cmd IO::Socket::INET); @@ -34,6 +34,8 @@ sub new { $obj = $type->SUPER::new(PeerAddr => ($host = $h), PeerPort => $arg{Port} || 'smtp(25)', + LocalAddr => $arg{LocalAddr}, + LocalPort => $arg{LocalPort}, Proto => 'tcp', Timeout => defined $arg{Timeout} ? $arg{Timeout} @@ -477,6 +479,9 @@ B - SMTP requires that you identify yourself. This option specifies a string to pass as your mail domain. If not given a guess will be taken. +B and B - These parameters are passed directly +to IO::Socket to allow binding the socket to a local port. + B - Maximum time, in seconds, to wait for a response from the SMTP server (default: 120) @@ -636,6 +641,6 @@ it under the same terms as Perl itself. =for html
-I<$Id: //depot/libnet/Net/SMTP.pm#20 $> +I<$Id: //depot/libnet/Net/SMTP.pm#21 $> =cut -- cgit v1.2.3-24-ge0c7