From 85256885bd136ff4b26fa3e2b302e4f3928dc178 Mon Sep 17 00:00:00 2001 From: Graham Barr Date: Fri, 17 Aug 2001 13:14:27 +0000 Subject: Doc updates and add cc and bcc as aliases for recipient --- Net/SMTP.pm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Net/SMTP.pm b/Net/SMTP.pm index 9037c26..2236c54 100644 --- a/Net/SMTP.pm +++ b/Net/SMTP.pm @@ -16,7 +16,7 @@ use IO::Socket; use Net::Cmd; use Net::Config; -$VERSION = "2.15"; # $Id: //depot/libnet/Net/SMTP.pm#14 $ +$VERSION = "2.15"; # $Id: //depot/libnet/Net/SMTP.pm#15 $ @ISA = qw(Net::Cmd IO::Socket::INET); @@ -308,7 +308,11 @@ sub recipient return $skip_bad ? @ok : 1; } -sub to { shift->recipient(@_) } +BEGIN { + *to = \&recipient; + *cc = \&recipient; + *bcc = \&recipient; +} sub data { @@ -546,9 +550,17 @@ If C is true the C will not return an error when a bad address is encountered and it will return an array of addresses that did succeed. + $smtp->recipient($recipient1,$recipient2); # Good + $smtp->recipient($recipient1,$recipient2, { SkipBad => 1 }); # Good + $smtp->recipient("$recipient,$recipient2"); # BAD + =item to ( ADDRESS [, ADDRESS [...]] ) -A synonym for C. +=item cc ( ADDRESS [, ADDRESS [...]] ) + +=item bcc ( ADDRESS [, ADDRESS [...]] ) + +Synonyms for C. =item data ( [ DATA ] ) @@ -597,6 +609,6 @@ it under the same terms as Perl itself. =for html
-I<$Id: //depot/libnet/Net/SMTP.pm#14 $> +I<$Id: //depot/libnet/Net/SMTP.pm#15 $> =cut -- cgit v1.2.3-24-ge0c7