home *** CD-ROM | disk | FTP | other *** search
- <?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;
- }
-
- }
-
- ?>
-