Setting xampp to be able to send emails through the localhost. Used this guys instructions http://www.root25.com/2014/04/send-email-using-xampp-from-localhost.html and it was pretty straight forward.
It comes up with an error message:
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\process.php on line 56
PHP CODE
if (!($formerrors)) :
$to = "email@email.com";
$subject = "From $myname -- Contact/Booking Page";
$message = "$myname filled out the form";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'From: Patrick <email@email.com>' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$replyto = "From: $email \r\n".
"Reply-To: secondemail@email.com" . "\r\n";
if (mail($to, $subject, $message, $headers)):
$msg = "Thanks for filling out our form";
else:
$msg = "Problem sending the message";
endif; // mail form data
endif; // check for form errors
Not sure what the problem is here. Any advice?