1. Computing

Discuss in my forum

How to Configure PHP to Use a Local Mail Server for Sending Mail

By

It's easy to send mail from PHP scripts. For it to work you still need the right configuration in php.ini, however. If you run PHP on Unix or on Windows with a local mail server, you might want to take advantage of that server.

The relevant setting is in the [mail function] section of php.ini, and is called sendmail_path. It should be assigned the path to sendmail, typically /usr/sbin/sendmail or /usr/bin/sendmail (but check your system to get it right).

Configure PHP to Use a Local Mail Server for Sending Mail

Thus your configuration might look like:

[mail function]
sendmail_path = /usr/sbin/sendmail

If you use a different mail server, use its sendmail wrapper (var/qmail/bin/sendmail for qmail, for example).

©2014 About.com. All rights reserved.