about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2001-08-17 13:14:27 +0000
committerGraham Barr <gbarr@pobox.com>2001-08-17 13:14:27 +0000
commit85256885bd136ff4b26fa3e2b302e4f3928dc178 (patch)
tree3ba3913d5bc6ac5a43ce0c3f913b2192f7a417fe
parent06eda546f5a32a307c5739e3a34a5dd2a70573ed (diff)
downloadperl-libnet-85256885bd136ff4b26fa3e2b302e4f3928dc178.tar.gz
Doc updates and add cc and bcc as aliases for recipient
-rw-r--r--Net/SMTP.pm20
1 files 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<SkipBad> is true the C<recipient> 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<recipient>.
+=item cc ( ADDRESS [, ADDRESS [...]] )
+
+=item bcc ( ADDRESS [, ADDRESS [...]] )
+
+Synonyms for C<recipient>.
 
 =item data ( [ DATA ] )
 
@@ -597,6 +609,6 @@ it under the same terms as Perl itself.
 
 =for html <hr>
 
-I<$Id: //depot/libnet/Net/SMTP.pm#14 $>
+I<$Id: //depot/libnet/Net/SMTP.pm#15 $>
 
 =cut