This is a discussion on email using PEAR within the PHP Language forums, part of the PHP Programming Forums category; I am running Red Hat 8.0 and have pear enabled in PHP. I have installed the Socket.php in ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am running Red Hat 8.0 and have pear enabled in PHP. I have installed
the Socket.php in the PEAR Net/ directory. When I run this test script It displays the "Mail has been sent message" but no mail arrives in my box. It was suggested by a friend that using PEAR was easier than setting up sendmail on my box. Any suggestions would be greatly appreciated. David <?php include("Mail.php"); $recipients = "davidwright@sympatico.ca"; $headers["From"] = "myaddress@host.com"; $headers["To"] = "myaddress@host.com"; $headers["Subject"] = "Test message"; $body = "TEST MESSAGE!!!"; $params["host"] = "smtp.server"; $params["port"] = "25"; $params["auth"] = true; $params["username"] = "user"; $params["password"] = "password"; // Create the mail object using the Mail::factory method $mail_object =& Mail::factory("smtp", $params); $mail_object->send($recipients, $headers, $body); echo "Mail has been sent!!\n"; ?> |