MARC
Mailing list ARChives
FOLDOC
Computing Dictionary
PHP Sendmail Function
Title: PHP Sendmail Function
Contributor: Randall Goguen (aka Ranman)
Last Update: Monday August 7 00:08 EDT 2000
<?
function send_mail($to, $from, $subject, $body) {
$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: $subject\n\n");
$num += fputs ($fp, "$body");
pclose ($fp); if ($num>0) { return 1; } else { return 0; } }
?>
Anyone who wishes to make additions or changes to this
PHP Tip email them to webmaster@linuxguruz.org
This document is Copyright (c) 1999, 2000 by LinuxGuruz
Return to the LinuxGuruz PHP Tutorials Page Return to the LinuxGuruz Main Page
www.PHP.net Search Engine
Restrict the search to:
Whole site
Online documentation
PHP 3.0 Mailing List
PHP Developers' List
PHP Documentation List
PHPLIB Mailing List
PHPLIB Developers' List
Site PHP 3.0 source code
Copyright © 1999, 2000 The PHP Development Team.
Return to the LinuxGuruz PHP Tutorials Page
Return to the LinuxGuruz Main Page