I'm using the following code:
if(!mail("admin@server.com", "Feedback Form", "From: ".$name."\n\n".$message, "From: ".$name." <".$email.">\r\n"."Reply-To: ".$email."\r\n"."X-Mailer: PHP/" . phpversion())){
echo 'There has been a problem with the submission. Please email the webmaster at <a href="mailto:webmaster@server.com"><B>webmaster@server.com</B></a>.';
} else {
echo 'The message has been senst succesfully. Thank you for your submission.';
}
I get the message saying the mail was not sent but in fact the email did go through. Maybe someone else can point out an error in my code. Thanks