mail() PHP not work
I tried to use the mail() php function in the contact form, but I never received it. Does your free hosting not provide the functionality of PHP mail()?
this is my code
<?php if (isset($_POST['submit'])) { $emailTo = 'nabil@xyraclius.ezyro.com'; $name = addslashes(trim($_POST['Name'])); $clientEmail = addslashes(trim($_POST['Email'])); $subject = addslashes(trim($_POST['Subject'])); $message = addslashes(trim($_POST['Message'])); if($clientEmail !='' && $subject != '' && $message != '' && $name != '') { // Send email $headers = "From: " . $clientEmail . " <" . $clientEmail . ">" . "\r\n" . "Reply-To: " . $clientEmail; mail($emailTo, $subject . " (Form nabil@xyraclius.ezyro.com)", $message, $headers); } echo "<meta http-equiv=\"refresh\" content=\"0; url=index.php\">"; } ?>
Comments
-
Please check this thread: https://profreehost.com/forum/index.php?u=/topic/23/ggundelivered-mail-returned-to-sender/post-65
-
Please check your spam folder.It should be there.