mail() PHP not work

xyraclius
edited November -1 in Support Forums

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