#!/usr/bin/perl #040297nh #Hawk-Mailer v.9 #I am not responsible for anything that you use this program for. #Used to E-Mail a list of people with the same message. #Can be used with Hawk-Strip. #The File in $names (list.txt) needs to be formatted as such # # postmaster@bob.com&& # postmaster@robert.com&& # harold@bobby.com&& # .........etc. # #$mailprog is location of your mail program # #$names refers to file of addresses split with && # #$file refers to file with body message of mail # #$error refers to error file # #$from is who you want the mail to say it's from (very Traceable, so be nice) ######## #CONFIG# ######## $mailprog = '/usr/lib/sendmail'; $names = 'list.txt'; $file = 'message.txt'; $error = 'sperror.txt'; $from ='whomever@where-ever.com'; ###### #Prog# ###### open (NAME, "$names"); $line = ; while ($line ne "") { @fields = split(/&&/, $line); $line = $fields[0]; $person = $fields[1]; open (FILE, "$file"); open (MAIL, "|$mailprog -t"); print MAIL "To:" . $line . "\n"; print MAIL "From: $from\n"; print MAIL "$message\n"; $counter = 0; @query = ; foreach $key (@query) { if ($key =~ /<>/) { $key =~ s/<>/$person/; } print MAIL "$key"; $counter=1; if ($counter == 2) { if (-e "$error") { open (MAIL1, ">>$error"); print MAIL1 "STOP Almost had a Mail Loop!"; close (MAIL1); last; } else { open (MAIL1, ">$error"); print MAIL1 "STOP Almost had a Mail Loop!"; close (MAIL1); last; } } } close (MAIL); close (FILE); $line = ; } print ("Content-type: text/html\n\n"); print "Hawk-Mailer Return"; print ""; print "
"; print "

You have just sent mail to:

"; open (NAME, "$names"); $line = ; while ($line ne "") { @fields = split(/&&/, $line); $line = $fields[0]; print "$line
\n"; $line = ; } print "
"; print "
Hope you were nice.....
"; print "

By using this program, you agree that this is at your own risk and you WILL NOT and CAN NOT hold me responsible for anything!
Nitehawk '97\n\n"; close (NAME); close (MAIL2); exit;