Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- my $sendmail = "/usr/sbin/sendmail -t";
- $email = "root\@kratos.vivahosting.it";
- open (DOT,"<data");
- while (<DOT>) {
- chomp;
- #print $_;
- $data = $data."\n".$_;
- $count ++;
- }
- close DOT;
- open (DOT,"</dev/input2/bulk-mailer/src/mail.dat");
- while (<DOT>) {
- chomp;
- print $_."\n";
- $email = $_;
- open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!";
- print SENDMAIL "From: pollux test<root\@kratos.vivahosting.it>\n";
- print SENDMAIL "Subject: THE BIG ANNOUNCEMENT!!!\n";
- print SENDMAIL "To: $email\n";
- print SENDMAIL "Content-type: text/html\n\n";
- print SENDMAIL "$data";
- close(SENDMAIL);
- $count ++;
- }
- close DOT;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement