heres the code...
if($target_email == "")
{
header("Location: #");
break;
}
else
{
$date = date("Y-m-d");
$time = date("H:i:s");
$ef_from = "[email address]";
// define recipient
$headers = "MIME-Version: 1.0\r\n";
$headers .= " Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: [email address]\r\n";
//* additional headers
$mailto = $target_email;
// set the subject of the mail
$mailsubject = "Confirmation.";
//build message body
$announce_subject = $mailsubject;
$announce_from_email = $ef_from;
$announce_to_email = $mailto;
$body = "<HTML><HEAD><TITLE>blah</TITLE>";
$MP = "/usr/sbin/sendmail -t";
$spec_envelope = 1;
// Access Sendmail
// Conditionally match envelope address
if($spec_envelope)
{
$MP .= " -f $announce_from_email";
}
$fd = popen($MP,"w");
fputs($fd, "To: $announce_to_email\n");
//fputs($fd, "From: $announce_from_name <$announce_from_email>\n");
//fputs($fd, "Subject: $announce_subject\n");
fputs($fd, "X-Mailer: PHP4\n");
fputs($fd, "$body -\r\r\n", $headers);
pclose($fd);
}