Just trying to get simple contact form working. The core of the problem is my "mail()" function isn't working correctly. With this simple line:
Code: Select all
mail('realemailaddress@gmail.com', 'PHP Mail Test', 'Hello World');
I get the error: Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\wamp\www\startup\mailtest.php on line 2
so I added the from header like this:
Code: Select all
mail('realemailaddress@gmail.com', 'PHP Mail Test', 'Hello World', 'From: webmaster@example.com');
and I get the error: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\startup\mailtest.php on line 2
Any help would be appreciated. Thanks.