PHP script returns Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing

Issue:

When the form is submitted the script returns Warning: mail():"sendmail_from" not set in php.ini or custom "From: header missing


How to solve:

Some PHP servers running on MS-Windows operating system require aditionals mail configuration parameters, in this case open your script and locate the "mail($.....);" command and add the following lines of code just before it:

ini_set("sendmail_from"," This e-mail address is being protected from spambots. You need JavaScript enabled to view it ");
ini_set("SMTP","mail.yoursite.com");