Hello all, This is my first thread in this forum, I hope you could help me in this thread. I've created a contact form for my website, I'm using php, html and css php is used for the contact form engine that sends the mail, Here is my code: HTML: <div id="sss"> <form method="post" action="contactengine.php"> <input type="text" id="name"> <input type="text" id="emailad"> <textarea name="message" id="message" cols="30" rows="10"> <input type="submit" class="send" value="Send" /> </form> </div> </div> PHP: <?php $EmailTo = "My email"; $Subject = "Message Sent"; $Name = Trim(stripslashes($_POST['Name'])); $Email = Trim(stripslashes($_POST['Email'])); $Message = Trim(stripslashes($_POST['Message'])); // validation $validationOK=true; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; exit; } // prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Message: "; $Body .= $Message; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=contactthanks.html\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?> the contact thanks page is displayed by no email received Thanks all
<form method="post" action="contactengine.php"> <input name="Name" type="text" id="name"> <input name="Email" type="text" id="emailad"> <textarea name="Message" id="message" cols="30" rows="10"> <input type="submit" class="send" value="Send" /> </form> Code (markup):
Maybe is php configuration problem in php.ini Locate php.ini and check SMTP values (values for your mail server): SMTP = your mail server e.g) mail.yourdomain.com smtp_port =25(check your admin for original port)