php email to send a form
<p>I've just made a survey form, and I can't quite figure out how to get the body to come up on the email, does anyone know what I've done wrong? </p>

<pre><code>&lt;?php

require_once "Mail.php";

      //send to and whats it called\\
      $recipient = 'x@x.co.nz';
      $subject = ' Completed Survey';

$from = "Mail House &lt;x@x.co.nz&gt;";
$to = "A &lt;x@x.co.nz&gt;";


      //Get comments and scores\\
      $q1s = $_POST['question1-score'];
      $q1c = $_POST['question1-comment'];
      $q2s = $_POST['question2-score'];
      $q2c = $_POST['question2-comment'];
      $q3s = $_POST['question3-score'];
      $q3c = $_POST['question3-comment'];
      $q4s = $_POST['question4-score'];
      $q4c = $_POST['question4-comment'];
      $q5s = $_POST['question5-score'];
      $q5c = $_POST['question5-comment'];
      $q6s = $_POST['question6-score'];
      $q6c = $_POST['question6-comment'];
      $comment = $_POST['final-comment'];

      $email = 'x@x.co.nz';
      $name =  'Client';
      //$email = htmlspecialchars($_POST['email']);


$host = "smtp.host.com";
$username = "x";
$password = "x";

$headers = array ('From' =&gt; $from,
  'To' =&gt; $to,
  'Subject' =&gt; $subject);
$smtp = Mail::factory('smtp',
  array ('host' =&gt; $host,
    'auth' =&gt; true,
    'username' =&gt; $username,
    'password' =&gt; $password));

$mail = $smtp-&gt;send($to, $headers, $body);



      if (strstr("\n",$email)){
       // $from contains line breaks
       die("bad input in the email field");
      }

       $body  = "Name:\t $name \n\n";
       $body .= "Question 1: $q1s - $q1c \n\n";
       $body .= "Question 2: $q2s - $q2c \n\n";
       $body .= "Question 3: $q3s - $q3c \n\n";
       $body .= "Question 4: $q4s - $q4c \n\n";
       $body .= "Question 5: $q5s - $q5c \n\n";
       $body .= "Question 6: $q6s - $q6c \n\n";
       $body .= "Final Comment:\t $comment \n";
       $headers = "From: $email \n";
       if(mail($recipient, $subject, $body, $headers)){
        echo(
         "&lt;h3 style='color:green;'&gt;Thank you, satisfaction survey successfully sent!&lt;/h3&gt;&lt;br&gt;Summary of your feedback".
         "&lt;ul id='output'&gt;".
         "\t&lt;li&gt;Q1: &lt;span&gt;".$q1s."&lt;/span&gt; &amp;mdash; ".$q1c."&lt;/li&gt;".
         "\t&lt;li&gt;Q2: &lt;span&gt;".$q2s."&lt;/span&gt; &amp;mdash; ".$q2c."&lt;/li&gt;".
         "\t&lt;li&gt;Q3: &lt;span&gt;".$q3s."&lt;/span&gt; &amp;mdash; ".$q3c."&lt;/li&gt;".
         "\t&lt;li&gt;Q4: &lt;span&gt;".$q4s."&lt;/span&gt; &amp;mdash; ".$q4c."&lt;/li&gt;".
         "\t&lt;li&gt;Q5: &lt;span&gt;".$q5s."&lt;/span&gt; &amp;mdash; ".$q5c."&lt;/li&gt;".
         "\t&lt;li&gt;Q6: &lt;span&gt;".$q6s."&lt;/span&gt; &amp;mdash; ".$q6c."&lt;/li&gt;".
         "&lt;/ul&gt;".
         "&lt;p&gt;Final comment: ".$comment."&lt;/p&gt;"
        );
       } else {
        echo("&lt;h3 style='color:red;'&gt;Oops, something went wrong &lt;a href='index.php'&gt;try again&lt;/a&gt;&lt;/h3&gt;");
       }
      ?&gt;
</code></pre>
