DBookatay Posted April 25, 2008 Share Posted April 25, 2008 I am redoing the forms on my site and I keep getting an error. When a user submits a form on my site the script does 2 things, it inserts the values inti the dB, (for me to view) and sends the user an email at the same time. Everything works fine, except that I keep getting This is the Postfix program at host studebaker.dreamhost.com. I'm sorry to have to inform you that your message could not be be delivered to one or more recipients. It's attached below. For further assistance, please send mail to <postmaster> If you do so, please include this problem report. You can delete your own text from the attached returned message. The Postfix program <unknown>: No recipients specified error, even though the email still gets sent... I've tried the form on several different email addresses, POP3's, Gmail, Yahoo, and AOL. All of which works, but I (the website admin) still gets the error email saying the the email didnt go through. Anyone have any ideas? Here is the code: if ($_POST['infoRequest'] == "Send Request") { $name = ($_POST['name']); $subject = $vehicle.' Info Request'; $email = ($_POST['email']); $phone = '('.$_POST['ph1'].') '.$_POST['ph2'].'-'.$_POST['ph3']; if ($_POST['replyby'] == "Email") { $response = $email; } else { $response = $phone; } $comments = stripslashes(ucfirst($_POST['comments'])); $now = date("Y/m/d"); $day = date("m").'/'.date("d").'/'.date("y"); $time = time(); $datetime = date("g:ia", $time + (10800)); $submitted = $date .' @ '. $datetime; $requestQuery = mysql_query ("INSERT INTO Messages (recipient, `from`, status, subject, submitted) VALUES ('DBookatay', '$name', 'New', '$subject', '$now' )") or die(mysql_error()); echo '<script language="JavaScript1.1">location.replace("view2.php?stock='.$stock.'&tab=InfoRequest#tabs");</script>'; } if ($requestQuery) { $to = $email; $subject = "www.carcityofdanbury.com"; $headers = "MIME-Version: 1.0"."\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1"."\r\n"; //$headers .= "From: Info Request <brad@carcityofdanbury.com>"."\r\n"; $headers .="From: sales@carcityofdanbury.com\r\nReply-To: sales@carcityofdanbury.com"; $message = '<html xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><style>body {margin: 0px; padding: 0; empty-cells: hide; background-color: #ffffff;}table {border-collapse: collapse; border-spacing: 0;}td {padding: 0; margin: 0px; font-family: Arial; font-size: 11px; color: #333333;}a {color: #0000ff; text-decoration: underline;}a:hover {color: #0000ff; text-decoration: none;}</style></head><body><table border="0" cellspacing="0" cellpadding="0" width="600" style="width: 6.25in; mso-cellspacing: 0in; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in" class="style1"><tr><td colspan="2"><a href="http://www.carcityofdanbury.com" target="_blank"><img border="0" width="600" height="100" src="http://www.carcityofdanbury.com/Email/header.gif" alt="Quality Used Cars, Trucks, Vans & SUV\'s"></a></td></tr><tr><td colspan="2"><img src="http://www.carcityofdanbury.com/images/Common/spacer.gif" width="1" height="10" border="0" /></td></tr><tr><td align="right" style="text-align: right; font-size: 11px; font-family: Arial; padding: 0 10 0 0" colspan="2">Submitted: <b>'.$submitted.'</b></td></tr><tr><td style="font-size: 20px; font-family: Arial; font-weight: bold; color: #ff0000" colspan="2"> Info Request</td></tr><tr><td width="30"> </td><td style="width: 570px"><table><tr><td width="325" valign="top" style="font-size: 12px; padding: 12 0 0 0">Thank you '.$_POST['name'].',<p> We have received your request for additional information requarding our '.$vehicle.'and are happy to help you with any questions that you have.<p> We will be glad to answer your questions:<p><b>"'.$comments.'"</b>, as soon as possible.<p>You should expect to recieve a response at '.$response.'.</td><td width="20"><img src="http://www.carcityofdanbury.com/images/Common/spacer.gif" width="20" height="1" border="0" /></td><td width="225">'.$emailPic.'</td></tr><tr><td width="550" colspan="3"><img src="http://www.carcityofdanbury.com/images/Common/spacer.gif" width="1" height="20" border="0" /></td></tr><tr><td width="325" valign="top"><table width="325" style="font-size:11px;"><tr><td style="height:25px; font-size:12px; color:#ffffff; background-color:#3C3C77" colspan="4"><b> Vehicle Information</b></td></tr><tr height="25" style="font-size:11px;"><td width="10" rowspan="8"> </td><td width="190"> VIN:</td><td width="205"><b>'.$vin.'</b></td><td width="20" rowspan="8"> </td></tr><tr height="25" style="font-size:11px; background-color: #cccccc;"><td width="190" style="border-top: 1px solid #999999;"> Mileage:</td><td width="205" style="border-top: 1px solid #999999;"><b>'.$mileage.'</b></td></tr><tr height="25"><td width="190" style="border-top: 1px solid #999999;"> Engine:</td><td width="205" style="border-top: 1px solid #999999;"><b>'.$engine.'</b></td></tr><tr height="25" style="background-color: #cccccc;"><td width="190" style="border-top: 1px solid #999999;"> Transmission:</td><td width="205" style="border-top: 1px solid #999999;"><b>'.$trans.'</b></td></tr><tr height="25"><td width="190" style="border-top: 1px solid #999999;"> Drivetrain:</td><td width="205" style="border-top: 1px solid #999999;"><b>'.$drivetrain.'</b></td></tr><tr height="25" style="background-color: #cccccc;"><td width="190" style="border-top: 1px solid #999999;"> M.P.G.\'s:</td><td width="205" style="border-top: 1px solid #999999;">'.$emailGas.'</td></tr>'.$passengers.'<tr><td style="height:20px;" colspan="4"> </td></tr></table><table style="font-size:11px;"><tr><td style="height:25px; font-size:12px; color:#ffffff; background-color:#3C3C77" colspan="4"><b> Warranty Information</b></td></tr><tr height="25"><td width="10" rowspan="8"> </td><td width="190"> <font color="#ff0000">Included Warranty:</font></td><td width="205"><b>'.$emailWarrIncld.'</b></td><td width="20" rowspan="8"> </td></tr>'.$emailExtnd.'</table></td><td width="20"><img src="http://www.carcityofdanbury.com/images/Common/spacer.gif" width="20" height="1" border="0" /></td>'.$spls.'</tr></table></td></tr><tr><td colspan="2"><img src="http://www.carcityofdanbury.com/images/Common/spacer.gif" width="1" height="20" border="0" /></td></tr><tr><td colspan="2" style="border-bottom: 1px solid #000000" align="center"> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Saab"><img alt="Saab" src="http://www.carcityofdanbury.com/images/Logos/Saab.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Honda"><img alt="Honda" src="http://www.carcityofdanbury.com/images/Logos/Honda.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Oldsmobile"><img alt="Oldsmobile" src="http://www.carcityofdanbury.com/images/Logos/Oldsmobile.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Dodge"><img alt="Dodge" src="http://www.carcityofdanbury.com/images/Logos/Dodge.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Jeep"><img alt="Jeep" src="http://www.carcityofdanbury.com/images/Logos/Jeep.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Mazda"><img alt="Mazda" src="http://www.carcityofdanbury.com/images/Logos/Mazda.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Saturn"><img alt="Saturn" src="http://www.carcityofdanbury.com/images/Logos/Saturn.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Scion"><img alt="Scion" src="http://www.carcityofdanbury.com/images/Logos/Scion.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Kia"><img alt="Kia" src="http://www.carcityofdanbury.com/images/Logos/Kia.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Hyundai"><img alt="Hyundai" src="http://www.carcityofdanbury.com/images/Logos/Hyundai.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Audi"><img alt="Audi" src="http://www.carcityofdanbury.com/images/Logos/Audi.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Chrysler"><img alt="Chrysler" src="http://www.carcityofdanbury.com/images/Logos/Chrysler.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=GMC"><img alt="GMC" src="http://www.carcityofdanbury.com/images/Logos/GMC.gif" border="0"></a><br><a href="http://www.carcityofdanbury.com/search.php?vehMke=Lincoln"><img alt="Lincoln" src="http://www.carcityofdanbury.com/images/Logos/Lincoln.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Nissan"><img alt="Nissan" src="http://www.carcityofdanbury.com/images/Logos/Nissan.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Pontiac"><img alt="Pontiac" src="http://www.carcityofdanbury.com/images/Logos/Pontiac.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Ford"><img alt="Ford" src="http://www.carcityofdanbury.com/images/Logos/Ford.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Lexus"><img alt="Lexus" src="http://www.carcityofdanbury.com/images/Logos/Lexus.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Acura"><img alt="Acura" src="http://www.carcityofdanbury.com/images/Logos/Acura.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Toyota"><img alt="Toyota" src="http://www.carcityofdanbury.com/images/Logos/Toyota.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Volkswagen"><img alt="Volkswagen" src="http://www.carcityofdanbury.com/images/Logos/VW.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=BMW"><img alt="BMW" src="http://www.carcityofdanbury.com/images/Logos/BMW.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Subaru"><img alt="Subaru" src="http://www.carcityofdanbury.com/images/Logos/Subaru.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Buick"><img alt="Buick" src="http://www.carcityofdanbury.com/images/Logos/Buick.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Chevrolet"><img alt="Chevrolet" src="http://www.carcityofdanbury.com/images/Logos/Chevy.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Infiniti"><img alt="Infiniti" src="http://www.carcityofdanbury.com/images/Logos/Infiniti.gif" border="0"></a> <a href="http://www.carcityofdanbury.com/search.php?vehMke=Mitsubishi"><img alt="Mitsubishi" src="http://www.carcityofdanbury.com/images/Logos/Mitsubishi.gif" border="0"></a></td></tr><tr><td colspan="2"><table><tr><td><img src="http://www.carcityofdanbury.com/images/Common/spacer.gif" width="10" height="1" border="0" /></td><td style="font-size: 9px; color: #999999;"><br />This message and any attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.<p>If you have received this communication in error, please notify the sender immediately with a \'reply\' message.<br />Thank you for your co-operation.</td><td><img src="http://www.carcityofdanbury.com/images/Common/spacer.gif" width="10" height="1" border="0" /></td></tr></table></td></tr></table></body></html>'; } if (mail($to, $subject, $message, $headers)) Quote Link to comment Share on other sites More sharing options...
DBookatay Posted April 25, 2008 Author Share Posted April 25, 2008 Sorry about the indents, I copied and pasted from my site... Quote Link to comment Share on other sites More sharing options...
DBookatay Posted April 25, 2008 Author Share Posted April 25, 2008 Anyone? Quote Link to comment Share on other sites More sharing options...
DBookatay Posted April 26, 2008 Author Share Posted April 26, 2008 Anyone? Quote Link to comment Share on other sites More sharing options...
doni49 Posted April 26, 2008 Share Posted April 26, 2008 Nothing stands out for me. Start troubleshooting by setting $to to a specific address right above the line that runs the mail command. Once you confirm whether or not that works, someone might be better able to help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.