Here is a simple function that does not use the mail() function provided in php. It does require that you have sendmail installed on the computer that is running this script.
function sendMail($to, $from, $sub, $mes) {
$path_to_sendmail = "/usr/sbin/sendmail";
$fp = popen("$path_to_sendmail -t", "w");
$num = fputs($fp, "To: $to\n");
$num += fputs($fp, "From: $from\n");
$num += fputs($fp, "Subject: $sub\n\n");
$num += fputs($fp, "$message\n\n");
pclose($fp);
if ($num > 0)
return 1;
else
return 0;
}
Hope this helps, please forgive all typos.
Mike J