I am developing a small real estate site. It includes an option to be mailed information on new listings. I have used the mail() function before without issue. However, the code below doesn't seem to be working for me. Can anyone lend a hand?
<?php
$listing=$_POST['LST_ID'];
$webAddrss=$row_fromSite['WEBADDRSS'];
$email=$row_fromSite['EMAIL'];
while ($row = mysql_fetch_array($MailTo)) {
$remId=$row['id'];
$toEmail=$row['email'];
$to="\t$toEmail";
$subject=">>>New listing on \t$webAddrss<<<";
$msg="E-MAIL SENT FROM WWW SITE\n";
$msg .="Listing#: \t$listing\n";
$msg .="click the link below or copy and past it into your browser address bar to view the listing.\n";
$msg .="<a href=\"http://www.\t$webAddrss/viewlisting.php?id=\t$id\">http://www.\t$webAddrss/viewlisting.php?id=\t$id</a>";
$msg .="Sender's E-MAIL: \t$email\n";
$msg .="\n\n\n";
$msg .="<a href=\"http://www.\t$webAddrss?id=\t$remId\">Remove me from the mailing list.</a>";
$mailheaders="From: \t$webAddrss <\t$email]>\n";
$mailheaders ."Reply-To: \t$email\n";
mail($to, $subject, $msg, $mailheaders);
}
?>
Thanx in advance