Hi Carl,
change > $smtp->datasend("To: Test\n"); to > $smtp->datasend("To:
groupname\n");
where groupname is set up as an mail alias on the Unix mail server for the
list of users
you wish to send to.
Cheers,
Sebastien.
----- Original Message -----
From: Carl Wainwright <carl.wainwright@t-modus.nec.co.uk>
To: 'CCUIG Mail List' <cciug@Rational.Com>
Sent: Wednesday, March 01, 2000 3:38 AM
Subject: [cciug] perl mail in NT
>
> 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:32 EDT