[cciug] perl mail in NT

From: Carl Wainwright (carl.wainwright@t-modus.nec.co.uk)
Date: Tue Feb 29 2000 - 11:38:32 EST


Hi

I have managed to send a mail from a NT perl script, but I was only able
to send a single user. The script came straight from the activeperl
examples

use Net::SMTP;

$smtp = Net::SMTP->new('mailserver'); # connect to an SMTP server
$smtp->mail( 'fred@dog.com' ); # use the sender's address here
$smtp->to( 'fred@dog.com'); # recipient's address
$smtp->data(); # Start the mail

# Send the header.
$smtp->datasend("From: fred@dog.com\n");
$smtp->datasend("To: Test\n");
$smtp->datasend("\n");

# Send the body.
$smtp->datasend("Perl by Mail\n");
$smtp->dataend(); # Finish sending the mail
$smtp->quit; # Close the SMTP connection

How can I use the above script to send an email to multiple users in
some pre-defined group

Thanks

------------------------------------------------------------------------
---------
Engineer + (CLEARCASE ADMIN)
SYSTEMS DEVELOPMENT DIVISION
Telecom MODUS Ltd
TEL : (01372)804833
------------------------------------------------------------------------
---------
------------------------------------------------------------------------
------------------------------
THIS MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL TO WHOM IT
IS
ADDRESSED AND CONTAINS INFORMATION THAT IS PRIVATE AND/OR PROPRIETARY.

If the reader of this message is not the intended recipient, or the
employee or
agent responsible for delivering the message to the intended recipient,
you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in
error, please notify us immediately. Thank you!
------------------------------------------------------------------------
------------------------------

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:23:31 EDT