title: PHP contact form configuration
body: <p>Hi guys I run my website and it all work except contact us form.
  HTML</p>
  <pre><code>&lt;div class=&quot;border&quot;&gt;&lt;/div&gt;
               &lt;form class=&quot;contact-form&quot; action=&quot;mail.php&quot; method=&quot;post&quot;&gt;
  
                &lt;div class=&quot;fisrtthree&quot;&gt;
                
                &lt;input type=&quot;text&quot; name=&quot;fname&quot; class=&quot;contact-form-text&quot; placeholder=&quot;First name&quot; required&gt;
                &lt;/div&gt;
  
                &lt;div class=&quot;fisrtthree&quot;&gt;
                
                &lt;input type=&quot;text&quot; name=&quot;lname&quot; class=&quot;contact-form-text&quot; placeholder=&quot;Last name&quot; required&gt;
                &lt;/div&gt;
  
                &lt;div class=&quot;fisrtthree&quot;&gt;
                
                &lt;input type=&quot;email&quot; name=&quot;email&quot; class=&quot;contact-form-text&quot; placeholder=&quot;Email&quot; required&gt;
                &lt;/div&gt;
  
                &lt;div&gt;
                
                &lt;textarea class=&quot;contact-form-text&quot; name=&quot;message&quot; rows=&quot;6&quot; maxlength=&quot;3000&quot; placeholder=&quot;Your message&quot; required&gt;&lt;/textarea&gt;
                &lt;/div&gt;
  
                &lt;div&gt;
                &lt;button type=&quot;submit&quot; id=&quot;fcf-button&quot; class=&quot;contact-form-btn&quot;&gt;Send&lt;/button&gt;
                &lt;div&gt;
  
               &lt;/form&gt;
  </code></pre>
  <p>PHP</p>
  <pre><code>&lt;?php
   if(isset($_POST['message']) == false) {     //  If there's no message
      echo &quot;Uh oh. Looks like you didn't actually include a message, friend.&lt;br&gt;&lt;br&gt;&quot;;
      die();   
  }
  
  
  $destination = &quot;#@gmail.com&quot;;       //  Put your email address here
  $subject = &quot;Message from your website!&quot;;   //  Fill in the subject line you want your messages to have
  $fromAddress = &quot;#@domain.com&quot;;   //  Fill in the email address that you want the messages to appear to be from
                                                                  //  Use a real address to reduce the odds of getting spam-filtered.
  $fname = $_POST['fname'];
  $lname = $_POST['lname'];
  $email = $_POST['email'];
  $message = str_replace(&quot;\n.&quot;, &quot;\n..&quot;, $_POST['message']);   //  Prevents a new line starting with a period from being omitted
  
  $message = &quot;First Name: &quot;. $fname .&quot;\n Last Name: &quot;. $lname .&quot;\n Email: &quot;. $email .&quot;\n Message: &quot;.$message.&quot;\n&quot;;
  
  $headers   = array();
  $headers[] = &quot;MIME-Version: 1.0&quot;;
  $headers[] = &quot;Content-type: text/plain; charset=iso-8859-1&quot;;
  $headers[] = &quot;From: &quot; . $fromAddress;
  $headers[] = &quot;Subject: &quot; . $subject;
  $headers[] = &quot;X-Mailer: PHP/&quot;.phpversion();
  
  mail($destination, $subject, $message, implode(&quot;\r\n&quot;, $headers));
  </code></pre>
     <p>Thanks for your message:<br>
     echo $message; ?>
   
     <br>
     Go back home
  ?>
  <p>As you see I tried to get message from #@domain.com and received it in mygmail@gmail.com. but it didn't work, I received nothing in my inbox. is there anything to do with my gmail and my hosted email.</p>