Hi, I made a few changes and organized it a little better, hope this works for you.
Jason
<HEAD>
<TITLE>
Invite all!
</TITLE>
</HEAD>
<BODY>
<?php
if ($password == "party") {
$mailinglist = fopen ("mailinglist.txt", "r");
while (!feof ($mailinglist)) {
$mail = fgets ($mailinglist, 1024);
$name = fgets ($mailinglist, 1024);
/* recipients */
$to = $name . " <" . $mail . ">";
/* subject */
$subject = "$name, you are invited!";
/* message */
$message ="<body>\n<p>Dear " . $name . ",</p>\n<P>you are invited to our party .... check your invitation by clicking the following link:</P>\n<P><A href=\"http://www.mydomain.com/invitation/start.php?name=$name\">Invitation!!</A></P>\n</body>";
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "Wrom: JVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPW
/* and now mail it */
mail($to, $subject, $message, $headers);
echo ("e-mail send to: $name, $mail<BR>");
}
} else {
?>
<FORM action="invite.php">
<INPUT type="password" name="password">
<INPUT type="submit">
</FORM>
<?
}
?>
</BODY>