Da die Phpsection alles andere als gut läuft fütter ich sie mal^^

Ein PHP MassMailerscript:

Code:
<?
$subject = $argv[1];
$from = $argv[2];
$replyto = $argv[2];
$yname = $argv[3];
$realname = $argv[3];
$email = $argv[4];
$message23 = $argv[5];
$emaillist = $email;
$contenttype = "html";
$uid = 1;
$contents = 0;
$linhase = @file($message23);
for($b=0;$b<count($linhase);$b++) {
        $messages2 .=$linhase[$b];
}
   if (!$subject && !$from && !$yname && !$email && !$message23){
   print "\nPlease complete all fields before sending your message.\n";
   print "php x.txt Subject YourEmail YourName Maillist.txt Letter.txt\n";
   exit;

   }
print "\n";
print "    This useful tool is written by xdh (www.0byte.org)\n";
print "         if you have any questions\n";
print "          xdh@bsdmail.com\n";
print "\n";
print "greetz 2 morgan, blah, NeThuG-47 and all users on gigachat\n";
print "\n";
print "[-] start spamming\n";
print "[-] Subject $subject\n";
print "[-] YourEmail $from\n";
print "[-] YourName $yname\n";
print "[-] Maillist $email\n";
print "[-] Letter $message23\n";
//$contenttype = 1;
$datei = fopen($email,"r");
        while (!feof($datei)) {
                $to = fgets($datei,100000);
      $to = ereg_replace(" ", "", $to);
      $header = "From: $yname <$from>\r\nReply-To: $replyto\r\n";
      $header .= "MIME-Version: 1.0\r\n";
      $header .= "Content-Type: text/html\r\n";
      $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
      $header .= "X-Priority: 1\n";
      $header .= "\r\n $messages2 \r\n";
      $contents=$contents+1;
      print "[$contents] Sending mail to $to";
      $fp = fopen("ok.txt","aw+");
      fwrite($fp,$to."\r\n");
      fclose($fp);
      mail($to, $subject, "", $header);
        }
fclose($datei);


?>