| px | top | add code | search | signup | login | help |
<?php
function send_mail($to_address, $from_address, $subject, $message) {
$path_to_sendmail = "/usr/lib/sendmail";
$fp = popen("$path_to_sendmail -t", "w");
$num = fputs($fp, "To: $to_address\n");
$num += fputs($fp, "From: $from_address\n");
$num += fputs($fp, "Subject: $subject\n\n");
$num += fputs($fp, "$message");
pclose($fp);
if ($num > 0) {
return 1;
} else {
return 0;
}
}
?>
Comments or questions?
PX is running PHP 5.2.11
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.