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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxxxxxxxx";

$headers["From"]    = "PHP at TCS <php@xxxxxxxxxxxxxxxx>";
$headers["To"]      = "Maciej ?enczykowski <maze@xxxxxxxxxxxxxxxx>";
$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);

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux