1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

email sending problem email.php

Discussion in 'Programming' started by omprakash2015, Aug 2, 2015.

  1. #1
    hello all peoples, please check attachment here i am using email.php and when i am fill up the form and sent the message from my website he saying thanks for sending your message sent but when i check my email no any message received, i have godaddy hosting with domain so where is the problem please check attachment and please provide me solution if anyone have another html and email.php code so please send or tell me the solution, thanks.
     

    Attached Files:

    omprakash2015, Aug 2, 2015 IP
  2. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #2
    ThePHPMaster, Aug 2, 2015 IP
  3. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #3
    I used this simple contact form in the past, worked just fine. Just one small file:

    <?php
    $action=$_REQUEST['action'];
    if ($action=="")    /* display the contact form */
        {
        ?>
        <form  action="" method="POST" enctype="multipart/form-data">
        <input type="hidden" name="action" value="submit">
        Your name:<br>
        <input name="name" type="text" value="" size="30"/><br>
        Your email:<br>
        <input name="email" type="text" value="" size="30"/><br>
        Your message:<br>
        <textarea name="message" rows="7" cols="30"></textarea><br>
        <input type="submit" value="Send email"/>
        </form>
        <?php
        } 
    else                /* send the submitted data */
        {
        $name=$_REQUEST['name'];
        $email=$_REQUEST['email'];
        $message=$_REQUEST['message'];
        if (($name=="")||($email=="")||($message==""))
            {
            echo "All fields are required, please fill <a href=\"\">the form</a> again.";
            }
        else{        
            $from="From: $name<$email>\r\nReturn-path: $email";
            $subject="Message sent using your contact form";
            mail("youremail@yoursite.com", $subject, $message, $from);
            echo "Email sent!";
            }
        }  
    ?> 
    Code (markup):
    Make sure you change to your own.
     
    qwikad.com, Aug 2, 2015 IP