Hi there. I'm using this mail function, borrowed from the Manual errata at PHP.net. But, it's not working to send mail like it's supposed to. Can you help me debug or point me in the direction of where the problem is? the path to sendmail is correct, i already checked that with my host. Thanks!
Jeof
function mailfrom($fromaddress, $toaddress, $subject, $body, $headers) {
$fp = popen('/usr/sbin/sendmail -f'.$fromaddress.' '.$toaddress,"w");
if(!$fp) return false;
fputs($fp, "To: $toaddress\n");
fputs($fp, "Subject: $subject\n");
fputs($fp, $headers."\n\n");
fputs($fp, $body);
fputs($fp, "\n");
pclose($fp);
return true;
}