How to Configure PHP to Use a Remote SMTP Server for Sending Mail
PHP makes it easy to send mail from Web applications. But it still needs a bit of configuration. As you probably know, PHP configuration happens php.ini.
The relevant section for email configuration is [mail function], and to make PHP use an external mail server you must set SMTP to your ISP's mail server's addres
READ Full article