Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Thanked 0 Times in 0 Posts

    Problem contact form will not send email

    Hi, i am new to coding, and i have a bit of a problem with the contact form on my website.

    i have designed and coded my site by my self with tutorials and basic html and css i have learned.

    my site is is here
    the code for the contact page is:
    i would really appreciate if you could help with this problem.
    thanks in advance.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>  
        <link href="css/stylesheet.css" rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="utf-8" />  
    <link href='http://fonts.googleapis.com/css?family=Exo:400,200' rel='stylesheet' type='text/css'>  
    <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.js" type="text/javascript"></script>  
    <script src="js/jquery.easing.1.3.js" type="text/javascript"></script>  
    <script src="js/animated-menu.js" type="text/javascript"></script>   
    <script src="js/jquery.validationEngine-en.js" type="text/javascript"></script>
    <script src="js/jquery.validationEngine.js" type="text/javascript"></script>
    		$(document).ready(function() {
    			// SUCCESS AJAX CALL, replace "success: false," by:     success : function() { callSuccessFunction() }, 
    				ajaxSubmit: true,
    					ajaxSubmitFile: "ajaxSubmit.php",
    					ajaxSubmitMessage: "Thank you, We will contact you soon !",
    				success :  false,
    				failure : function() {}
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Con's Folio | Get in touch</title>
    <style type="text/css">
    body {
    	background-color: white;
    <div id="index-container">
    <div id="banner"></div>
      <div id="menu">
          <li class="green">
            <p><a href="index.html">Home</a></p>
            <p class="subtext">The front page</p>
          <li class="yellow">
            <p><a href="about.html">Blog</a></p>
            <p class="subtext">More info</p>
          <li class="red">
            <p><a href="folio.html">Folio</a></p>
            <p class="subtext">Examples of work</p>
          <li class="blue">
            <p><a href="contact.html">Contact</a></p>
            <p class="subtext">Get in touch</p>
      <div id="filler-contact"></div>
    <div id="contact-form">
    <p class="name">
        <input name="name" type="text" class="validate[required,custom[onlyLetter],length[0,100]] text-input" id="name" value="" />
            <label for="name">Name</label>
          <p class="email">
            <input name="email" type="text" class="validate[required,custom[email]] text-input" id="email" value="" />
            <label for="email">E-mail</label>
          <p class="web">
            <input type="text" name="web" id="web" />
            <label for="web">Website</label>
      <p class="text">
            <textarea name="text" class="validate[required,length[3,300]] text-input" id="text"></textarea>
          <p class="text">
            <input type="submit" id="Send" value="Send"/>
    this is the php code i have to send the email.

    PHP Code:

    $_POST['name']; // contain name of person
    $email $_POST['email']; // Email address of sender 
    $web $_POST['web']; // Your website URL
    $comment $_POST['text']; // Your message 
    $receiver "myemail@gmail.com" // hardcorde your email address here - This is the email address that all your feedbacks will be sent to 
    if (!empty($name) & !empty($email) && !empty($comment)) {
    $body "Name:{$name}\n\nWebsite :{$web}\n\nComments:{$comment}";
    $send mail($receiver'Contact Form Submission'$comment"From: {$email}");
        if (
    $send) {
    'true'//if everything is ok,always return true , else ajax submission won't work


    Last edited by demostrates; 04-01-2012 at 08:35 AM.

  2. #2
    Join Date
    Mar 2012
    Thanked 28 Times in 28 Posts
    For one thing, php mail() requires smtp to be enabled on your ISP account otherwise it will not work.

    If smtp is enabled, then what eror messages are you getting?

  3. #3
    New to the CF scene
    Join Date
    Apr 2012
    Thanked 0 Times in 0 Posts
    There is no error message. the page reloads and the information i have entered shows in the address bar.
    so do i have to enable smtp on my email provider? (gmail)

  4. #4
    New to the CF scene
    Join Date
    Apr 2012
    Thanked 0 Times in 0 Posts
    I have solved the problem. thanks.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts