Forum Moderators: coopster

Message Too Old, No Replies

New Server - PEAR won't send mail

Can anyone help?

         

RussellC

6:37 pm on Dec 20, 2005 (gmt 0)

10+ Year Member



I have just set up a new Fedora server. All my scripts are running great but i cannot get pear to send emails for the life of me. I am using the same script from my previous server and it does not work even though it give no errors and says it sends the mail. Here is the script. Is there anything else I need to do on the server to make sure it will send correctly?

include("Mail.php");
$recipients = "recipient@example.com";
$headers["From"] = "sender@example.com";
$headers["To"] = "recipient@example.com";
$headers["Subject"] = "Examplified Subject";
$body = "Examplified Body";
$params["host"] = "11.22.33.44";
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = "username";
$params["password"] = "password";
$mail_object =& Mail::factory("smtp", $params);
$mail_object->send($recipients, $headers, $body);

This always has worked for me on my other server. Any ideas?

RussellC

2:17 pm on Dec 21, 2005 (gmt 0)

10+ Year Member



Nevermind. It had to do with SELinux firwall rules in Fedora. I was not familiar with this.