Jeff Pang wrote:
I need to send mail to all users defined in one array. I tried foreach
loop but what is happening is it is sending mail to only first user in
the array. not sending mails to rest of the users.
Is there any way to send a mail to all users in array in one shot. I am
using sendmail 2.09 module from CPAN.
Hello,
Just give my suggestion.I usually use Net::SMTP to sendmail to multi-recipients.
Using this module you don't need to foreach loop to sendmail.
For example,it can write:
my $smtp = Net::SMTP->new('Host'=>$mtahost,'Port'=>$mtaport);
$smtp->mail("[EMAIL PROTECTED]");
$smtp->recipient(@email_addresses);
Mail::Sender::Easy
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/