The PHP mail function is a wonderful feature of PHP but like all good things in life this function also has many drawbacks. On a Linux platform it requires sendmail to be installed, but coming to windows a SMTP server is needed to send email. So if you take a peak inside the php.ini file you’ll find the following line
[mail function] ; For Win32 only. SMTP = localhost smtp_port = 25
But the limitation here is you can only specify the SMTP server name and port, if the server requires authentication there is no provision for specifying the username and password. So unless you have a mail server configured to send local email without authentication there is no way to use the php mail() to send emails.Continue Reading…