Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8882259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:31:55+00:00 2026-06-14T20:31:55+00:00

We use a php email form on a website, it works fine when delivering

  • 0

We use a php email form on a website, it works fine when delivering email to other email programs, just not gmail, ive checked the spam and the inbox, but i get nothing, its as if gmail dosnt trust the email and completly ignores it. How can we get them to come through ?

the code im using for the form is :

<div id="contact-form">
<form id="commentForm" action="assets/php/mail.php" method="POST">
<input type="text" name="name" class="required" placeholder="Name..">

<input type="text" name="email" class="required email" placeholder="Email..">

<input type="text" name="phone" class="required" placeholder="Phone..">

<textarea name="message" placeholder="Message.." class="required"></textarea><br />

<input class="subm" type="submit" value="Submit..">
</form>
</div>

and the php is

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Contact Form Confirmation</title>

<meta http-equiv="refresh" content="4; url=http://www.domain.co.uk">
</head>

<body>

<?php $name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$formcontent="
<h1>From :</h1> $name \n
<h1>Email :</h1> $email \n
<h1>Phone :</h1> $phone \n 
<h1>Message :</h1> $message
";

$recipient = "studio@domain.co.uk";
$subject = "Contact Form";
$mailheader = "MIME-Version: 1.0" . "\r\n";
$mailheader .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$mailheader .= "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");

echo("<p>Thanks for getting in touch, we'll get back to you shortly..</p>");
?>

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:31:59+00:00Added an answer on June 14, 2026 at 8:31 pm

    GMail is not the only mail service that will ignore sendmail emails.

    Likely, the cause is that your From: header doesn’t match your mail server host name. If you’re using 3rd-party hosting, you should find out the host name (e.g. “myhost.com”) and use that in your From: header. Then use the correct email address in the “Reply-To” header instead.

    $mailheader .= "Reply-To: Some One <someone@mydomain.com>\r\n"; 
    $mailheader .= "Return-Path: Some One <someone@mydomain.com>\r\n"; 
    $mailheader .= "From: Some One <mydomain@myhost.com>\r\n"; 
    $mailheader .= "Organization: My Organization\r\n"; 
    $mailheader .= "Content-Type: text/plain\r\n"; 
    

    To increase deliverability, you should use SMTP to send a mail via an actual email account.

    To absolutely maximize deliverability, you should use an ESP.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP email script on my website that potential clients use to
I have a simple php script which I use in form on my website.
I'd like to use a contact form for a website I'm creating, but PHP
Trying to use a php generating the email address using the ID eg: peopleID
so I'm trying to use PHP's mail() function to send an email when users
Whenever I use PHP to send emails to members of my site, the email
I'm wanting to use a php variable as the destination email for Amazon SES
I have a contact form on my website, and everything works like a charm.
On my client's website (domain.com) we have a contact form which sends an email
i've just made a sign script for my website. The form posts the data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.