note 112234 deleted from function.mail by aharvey
| From: | aharvey@php.net | Date: | Fri, 24 May 2013 18:09:42 +0000 |
| Subject: | note 112234 deleted from function.mail by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-194933@lists.php.net to get a copy of this message | ||
Note Submitter: p a n i q u e at w e b dot d e
----
mail() will not work on a naked apache/php server. You need to setup a mailing tool, like sendmail,
first. Why the hell is this not explained here in the manual ?
After you have installed Apache, PHP etc, also install sendmail:
sudo apt-get install sendmail
After that, edit the php.ini (usually in etc/php5/apache2/php.ini) and search for this line:
;sendmail_path =
and change it to this:
sendmail_path = "/usr/sbin/sendmail -t -i"
Important: Remove the ";" in front of the line!
Important too: Most tutorials post this line without the two ", but in my case this never
worked without them.
Reboot the entire server.