Mail is not coming properly using php?
<p>I am using below simple code to send mail using php. when i echo the line <code>$headers = "From: . $email\r\n"; //echo $headers; exit;</code> which results like <code>From: . test@email.com</code>.
I found dot is printing before mail address , so mail is coming but not properly.If i remove dot , mail is not even coming.Whats wrong with this code ?</p>

<pre><code>&lt;?php
if (isset($_REQUEST['user_email']))
//if "email" is filled out, send email
  { 
  //send email
  $email = $_REQUEST['user_email'];
  $user_name = $_REQUEST['user_name'];
  $user_message = $_REQUEST['user_message'];
  include 'contact_mail_form.php';
  $to = "testtest@gmail.com"; 
  $message = $contactText; 
  $subject = "Test Mail";
  $headers = "From: . $email\r\n"; //echo $headers; exit;
  $headers .= "Content-type: text/html\r\n";  
  mail($to,$subject,$message,$headers);
  echo "Thank you for using our mail form";
  }
else
//if "email" is not filled out, display the form
  {

?&gt;
              &lt;form id="contact_form" name="ContactForm" action="" method="post" onsubmit="return checkContact(this);"&gt;
                &lt;div class="wrapper"&gt;
                  &lt;div class="fright"&gt;
                    &lt;div class="name"&gt;Message:&lt;/div&gt;
                     &lt;textarea cols="1" rows="1" name="user_message" id="user_message" &gt;&lt;/textarea&gt;
                    &lt;span class="clear"&gt;&lt;/span&gt; &lt;/div&gt;
                  &lt;div class="fleft"&gt;
                    &lt;div&gt;
                      &lt;div class="name"&gt;Your Name:&lt;/div&gt;
                       &lt;input type="text" class="input" name="user_name" id="user_name"  /&gt;
                      &lt;span class="clear"&gt;&lt;/span&gt; &lt;/div&gt;
                    &lt;div&gt;
                      &lt;div class="name"&gt;E-mail:&lt;/div&gt;
                        &lt;input type="text" class="input"  name="user_email" id="user_email" /&gt;
                      &lt;span class="clear"&gt;&lt;/span&gt; &lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="buttons"&gt;&lt;a class="more" href="javaScript:void(0);" onClick="document.getElementById('contact_form').reset()"&gt;clear&lt;/a&gt; &lt;input class="more1" type="SUBMIT" class="button2" value="Send" name="" /&gt; &lt;/div&gt;
              &lt;/form&gt;
                &lt;?php } ?&gt;
</code></pre>
