"; $message .= "Email address: " . $email . "
"; $message .= "Message:
"; $message .= nl2br($contact_message); $message .= "
-----
This email was sent from your site " . url() . " contact form.
"; // Set From: header $from = $name . " <" . $email . ">"; // Email Headers $headers = "From: " . $from . "\r\n"; $headers .= "Reply-To: ". $email . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; ini_set("sendmail_from", $to); // for windows server $mail = mail($to, $subject, $message, $headers); if ($mail) { echo "OK"; } else { echo "Something went wrong. Please try again."; } } ?>