title: PHP Email Function sending a blank body message with subject & sender email
body: <p>I am trying to make a quote forum that sends the input to an email. I have PHP sending the email, displaying the subject and the senders email, but it doesn't display the main body of content in the email that is sent.. here is my code:</p>
  
  <pre><code> &lt;?php 
   $action=$_REQUEST['action']; 
   if ($action=="")    /* display the contact form */ 
       { 
       ?&gt;
       &lt;div class="quote_text"&gt;Send us some of your information and we will get back to you as soon as possible. Let's get this ball rolling.&lt;/div&gt;
       &lt;br /&gt;&lt;br /&gt;
       &lt;span class="important"&gt;* = required fields&lt;/span&gt;&lt;br /&gt;
  
       &lt;form  action="" method="POST" enctype="multipart/form-data"&gt;
         &lt;table width="814" height="310" border="0"&gt;
         &lt;tr&gt;
           &lt;td width="419"&gt;
               &lt;input type="hidden" name="action" value="submit"&gt;
               Your Name:&lt;span class="important"&gt;*&lt;/span&gt;&lt;input name="name" type="text" value="" size="30"/&gt;&lt;br /&gt;&lt;br /&gt;
               Your Email:&lt;span class="important"&gt;*&lt;/span&gt;&lt;input name="email" type="text" value="" size="30" placeholder="example@example.com"/&gt;&lt;br /&gt;&lt;br /&gt;
               Phone Number:&lt;input name="phone" type="text" value="" size="10" maxlength="12" placeholder="(xxx)-xxx-xxxx" /&gt;&lt;br /&gt;&lt;br /&gt;
               Company Name:&lt;input name="company_name" type="text" value="" size="30"/&gt;&lt;br /&gt;     &lt;br /&gt;
           &lt;/td&gt;
           &lt;td width="385"&gt;
               Address of Installation:&lt;span class="important"&gt;*&lt;/span&gt;
               &lt;input name="install_address" type="text" value="" size="30"/&gt;&lt;br /&gt;&lt;br /&gt;
               City:&lt;span class="important"&gt;*&lt;/span&gt;&lt;input name="city" type="text" value="" size="30"/&gt;&lt;br /&gt;&lt;br /&gt;
               State:&lt;span class="important"&gt;*&lt;/span&gt;&lt;input name="state" type="text" value="" size="30"/&gt;&lt;br /&gt;&lt;br /&gt;
               Zip Code:&lt;span class="important"&gt;*&lt;/span&gt;&lt;input name="zip" type="text" value="" size="30"/&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
           &lt;/td&gt;
         &lt;/tr&gt;
         &lt;tr&gt;
           &lt;td height="102"&gt;
                   Fence Type Description:&lt;br /&gt;&lt;textarea name="description" rows="6" cols="45"&gt;&lt;/textarea&gt;
                   Number of Corners:&lt;input name="corners" type="text" value="" size="30"/&gt;
               &lt;/td&gt;
               &lt;td&gt;&lt;br /&gt;
                   Linear Feet:&lt;input name="linear" type="text" value="" size="30"/&gt;&lt;br /&gt;
                   OR&lt;br /&gt;
                   Acres:&lt;input name="acres" type="text" value="" size="30"/&gt;&lt;br /&gt;&lt;br /&gt;
                   Number of Gate Openings:&lt;input name="gate_opening" type="text" value="" size="30"/&gt;
           &lt;/td&gt;
       &lt;/tr&gt;
       &lt;/table&gt;&lt;br&gt;&lt;br&gt; 
       &lt;input type="submit" value="Send email"/&gt; 
     &lt;/form&gt; 
       &lt;?php 
       } else { 
  
       // Grab forum elements and push into variables for the email
       $name              = $_REQUEST['name']; 
       $email             = $_REQUEST['email']; 
       $phone                 = $_REQUEST['phone'];
       $company_name      = $_REQUEST['company_name'];
       $install_address   = $_REQUEST['install_address'];
       $city              = $_REQUEST['city'];
       $state             = $_REQUEST['state'];
       $zip               = $_REQUEST['zip'];
       $description       = $_REQUEST['description'];
       $corners           = $_REQUEST['corners'];
       $linear                = $_REQUEST['linear'];
       $acres             = $_REQUEST['acres'];
       $gate_opening      = $_REQUEST['gate_opening'];
  
  
  
       //Build Email
       $message="$name&lt;br /&gt;
                 $email&lt;br /&gt;
                 $phone&lt;br /&gt;
                 $company_name&lt;br /&gt;
                 $install_address&lt;br /&gt;
                 $city&lt;br /&gt;
                 $state&lt;br /&gt;
                 $zip&lt;br /&gt;
                 $description&lt;br /&gt;
                 $corners&lt;br /&gt;
                 $linear&lt;br /&gt;
                 $acres&lt;br /&gt;
                 $gate_opening&lt;br /&gt;";
  
       $message=$_REQUEST['message']; 
       if (($name=="")||($email=="")||($install_address="")||($city="")||($state="")||     ($zip=""))
           { 
           echo "Please fill the required fields. &lt;a href=\"\"&gt;Click here to try again.&lt;/a&gt;"; 
           } 
       else{         
           $from="From: $name&lt;$email&gt;\r\nReturn-path: $email"; 
           $subject="Blue Ridge Fencing - Quote Forum"; 
           mail("info@blueridgefenceco.com", $subject, $message, $from); 
           echo "Email sent! We will get back to you as soon as possible."; 
           } 
       }   
   ?&gt; 
  </code></pre>
  
  <p>Thank you so much for you help!</p>