- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
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
// 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
to this
What is the problem, what is the purpose of $EmailFrom? user will fill their own email in form.
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.
try this