# Email.php question

**URL:** <https://forum.kirupa.com/t/email-php-question/205662>\
**Category:** Uncategorized\
**Created:** [October 31, 2006, 7:35pm UTC](https://forum.kirupa.com/t/email-php-question/205662 "2006-10-31T19:35:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![metafiction](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@metafiction](https://forum.kirupa.com/u/metafiction)\
**Post date:** [October 31, 2006, 7:35pm UTC](https://forum.kirupa.com/t/email-php-question/205662/1 "2006-10-31T19:35:06Z")

</div>

Below is the php I wriote. the mail gets sent fine, but all the fields (name, phone, subject and comments) get jumbled into one long string in the body of the email. Thanks for looking:

$sendTo = "info@miramichiphoto.com";  
$subject = “Contact Form MP”;

$headers = “From: " . $\_POST[“name”] .” \<" . $\_POST[“email”] ."\>  
";

$headers .= "Reply-To: " . $\_POST[“email”] . "  
";

$headers .= "Return-path: " . $\_POST[“email”];

$message = $\_POST[“comments”];

$body = “From: $name\_field  
E-Mail: $email\_field  
Phone: $phone\_field  
Subject: $subject\_field  
Message:  
$comments\_field”;

mail($sendTo, $subject, $headers, $message, $body);
