Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Mmail not coming to gmail from contact us form?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24611
    jitendra
    Participant

    I downloaded this form https://css-tricks.com/examples/NiceSimpleContactForm/. my client use free gmail account and he want to get all mail in his gmail account through contact us form. I tested this but mail not coming to gmail.

    This is the code of form php

    Code:
    “;
    exit;
    }

    // prepare email body text
    $Body = “”;
    $Body .= “Name: “;
    $Body .= $Name;
    $Body .= “n”;
    $Body .= “Tel: “;
    $Body .= $Tel;
    $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 ““;
    }
    else{
    print ““;
    }
    ?>

    I just changed this

    Code:
    $EmailFrom = “[email protected]”;
    $EmailTo = “[email protected]”;

    to this

    Code:
    $EmailFrom = “[email protected]”;
    $EmailTo = “[email protected]”;

    What is the problem, what is the purpose of $EmailFrom? user will fill their own email in form.

    #56430
    cbrails
    Member

    The point of $Emailfrom is so that you can set a certain static email to have it LOOK like its coming from a certain person all the time. So if you set it to yourself, or to say "[email protected]", it doesn’t go to spam and you can even have it separated into a particular folder everytime. However, if you set the From to the $Email parameter instead, it will grab the input the user provides and will tell you its coming from that. Its up to you there.

    #56559
    krushna
    Member

    try this

    Code:


           
      Name : Address :  
       
      Contact No :  
       
      Email :  
       
           
     
     
           
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.