On Thu, 25 Jul 2002 06:36:40 -0700 (PDT), [EMAIL PROTECTED] (Shao-Ju
Chao) wrote:
>I wonder if there is a safer and better way sending email messages to a group of
>people.
>For example, there is a text file that has all the recipient email addresses:
>
You can specify your list, 1 email per line in bulkmaillist
#########################################################
#!/usr/bin/perl
use strict;
use warnings;
use Mail::Bulkmail;
my $email = '[EMAIL PROTECTED]';
#eval {
my $bulk = Mail::Bulkmail->new(
# "LIST" => ['[EMAIL PROTECTED]','[EMAIL PROTECTED]'],
"LIST" => "./bulkmaillist",
"GOOD" => \&good,
"BAD" => \&bad,
From => $email,
Subject => 'Test of Bulkmail',
Message => "Hi there, NAME. Mail::Bulkmail seems to work
fine!",
"X-test" => "Bulkmail test!"
) or die Mail::Bulkmail->error();
$bulk->bulkmail;
#};
sub good {print "Mail successfully sent to (@_)"}
sub bad {print "Mail did not send to (@_)"}
print "...error: $@" if $@;
##########################################################
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]