[CentOS] CentOS / BQ / PHP 4.3.9 with the mail() function

Tue Jun 14 17:26:04 UTC 2005
Maciej Żenczykowski <maze at cela.pl>

try the following - using php pear and an smtp connection to localhost 
instead of trying to exec postfix and running amok of selinux.

$recipients = "maze at tcs.ii.uj.edu.pl";

$headers["From"]    = "PHP at TCS <php at tcs.ii.uj.edu.pl>";
$headers["To"]      = "Maciej Żenczykowski <maze at tcs.ii.uj.edu.pl>";
$headers["Subject"] = "PHP Test message subject.";

$body = "This is the test message text.";

//$params["host"] = "localhost";
//$params["port"] = "25";
//$params["auth"] = false;
//$params["username"] = "user";
//$params["password"] = "password";

include("Mail.php");
// this is coming from /usr/share/pear
// so make sure php is allowed to include files from
// there if it's in safe mode
// /etc/php.ini:
// safe_mode_include_dir = /usr/share/pear/
// include_path = ".:/php/includes:/usr/share/pear"

$mail_object =& Mail::factory("smtp", $params);
$mail_object->send($recipients, $headers, $body);