####
##
##
##
##
##
##
##
##
##
##
open ADDLIST, "addlist" or die "can't open file: $!";
@names = ;
open NEWLIST, ">>emailist" or die "can't open file: $!";
foreach (@names) {
if ( $_ =~ /([^\s\@]{1,}\@[^\s\@]{1,})/) {
print NEWLIST $_;
}
}
##
##
##
##
$sendmail = "/usr/lib/sendmail -t";
open ADDRESS, "address.txt" or die "can't open file: $!";
@mail_to = ;
open BODY, "message.txt" or die "can't open file: $!";
$content = ;
foreach (@mail_to) {
open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!";
print SENDMAIL "To: $_ \n";
print SENDMAIL "From: csorensen\@uptimeresources.net \n";
print SENDMAIL "Subject: South African tourism survey \n";
print SENDMAIL "Content-type: text/plain \n\n";
print SENDMAIL $content;
close(SENDMAIL);
}