I can't seem to get mail() to work when I'm sending a TEXTARA as the message. Here's what my code looks like:
<? if (!$send) {
?>
<FORM action="index2.php?p=whole_apply.php&send=1" method="POST" name="form" id="form">
Your Business Name:<BR /><INPUT type="text" name="name" id="name">
<br />E-Mail Address: <BR /><INPUT type="text" name="address" id="address">
<br />
<br />TAX ID: <BR /><TEXTAREA name="information" id="information" cols="40" rows="10">Please include your phone # and address, as well as your TAX ID.</TEXTAREA>
<BR><BR>
<INPUT type="submit" value="Send Email" name="submit" id="submit">
<INPUT type="reset" value="Reset Form" name="reset" id="reset">
</FORM>
<? } else { ?>
<?
if ($send=='1') {
if ($name=="" or $address=="" or $information="") {
echo "You have to fill out the entire form, go back and try again.";
} else {
$to = "philn@webprocenter.net";
$subject = "Wholesale Access";
$headers .= "From: $name<$address>\n";
$headers .= "X-Sender: <$address>\n";
$headers .= "X-Mailer: PHP\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$headers .= "Return-Path: <$address>\n";
mail("$to", "$subject", "$information", "$headers");
echo "<p>$name, thanks for your inquiry. We will get back to you as soon as possible!</p>";
}
}
}
?>
any ideas? The e-mail is sent just fine, but the $information just doesn't go with it. I get e-mails from the right name with the right e-mail address, and subject, but nothing in the body.