I have searched, read, searched again, installed, uninstalled, reinstalled, changed packages, configured php.ini, checked every error log I could imagine and still can not get php's mail() function to work.
My last attempt was to install exim as a slew of google hits said exim is Ubuntu's preferred sendmail agent.
Here is my test page
Code:
<?php
$name="Ed Patterson";
$email = "edpatterson@email.com";
$recipient = "edpatterson@email.com";
$mail_body = "This would be the addition report";
$subject = "URL added to the everyone list";
$header = "From: ".$name." <".$email.">\n";
mail($recipient, $subject, $mail_body, $header);
echo "Mail Sent";
?>
my /etc/php5/apache/php.ini file has
Code:
sendmail_path = /usr/sbin/sendmail
Requesting the page from a browser returns
Mail Sent
and finally in the syslog
Code:
Exim is a Mail Transfer Agent. It is normally called by Mail User Agents, not directly from a shell command line. Options and/or arguments control what it does when called. For a list of options, see the Exim documentation.
It simply can not be this complicated. I must have missed a very basic step somewhere.
Ed
Bookmarks