How to Configure PHP to Send Mail via Local Server
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
READ Full article