fspector Posted June 24, 2008 Share Posted June 24, 2008 here is the file, it should go to the addresses on line 200 but i get an error, what am I doing wrong? <?php require_once 'Mail.php'; //PEAR's Mail Class require_once 'Mail/mime.php'; $recipient = '[email protected]'; $headers['To'] = '[email protected]'; $headers['From'] = '[email protected]'; $headers['Subject'] = 'Converter Application Form'; $crlf = "\n"; // Create MIME Object $mime = new Mail_mime($crlf); $dyno_yes = ''; $dyno_no = ''; if (isset($_POST['dyno_test'])) { if ($_POST['dyno_test'] == 'Yes') { $dyno_yes = 'checked'; $dyno_no = ''; } if ($_POST['dyno_test'] == 'No') { $dyno_yes = ''; $dyno_no = 'checked'; } } $carb_1 = ''; $carb_2 = ''; if (isset($_POST['num_carbs'])) { if ($_POST['num_carbs'] == '1') { $carb_1 = 'checked'; $carb_2 = ''; } if ($_POST['num_carbs'] == '2') { $carb_1 = ''; $carb_2 = 'checked'; } } $alco = ''; $gas = ''; if (isset($_POST['fuel'])) { if ($_POST['fuel'] == 'Alcohol') { $alco = 'selected'; $gas = ''; } if ($_POST['fuel'] == 'Gasoline') { $alco = ''; $gas = 'selected'; } } $nox_no = ''; $nox_yes = ''; if (isset($_POST['nitrous'])) { if ($_POST['nitrous'] == 'No') { $nox_no = 'checked'; $nox_yes = ''; } if ($_POST['nitrous'] == 'Yes') { $nox_no = ''; $nox_yes = 'checked'; } } $man_cast = ''; $man_sheet = ''; $man_other = ''; if (isset($_POST['manifold'])) { if ($_POST['manifold'] == 'cast') { $man_cast = 'checked'; $man_sheet = ''; $man_other = ''; } if ($_POST['manifold'] == 'sheet metal') { $man_cast = ''; $man_sheet = 'checked'; $man_other = ''; } if ($_POST['manifold'] == 'other') { $man_cast = ''; $man_sheet = ''; $man_other = 'checked'; } } $trans_brake_yes = ''; $trans_brake_no = ''; if (isset($_POST['trans-brake'])) { if ($_POST['trans-brake'] == 'Yes') { $trans_brake_yes = 'checked'; $trans_brake_no = ''; } if ($_POST['trans-brake'] == 'No') { $trans_brake_yes = ''; $trans_brake_no = 'checked'; } } $midplate_no = ''; $midplate_yes = ''; if (isset($_POST['vehicle-midplate'])) { if ($_POST['vehicle-midplate'] == 'No') { $midplate_no = 'checked'; $midplate_yes = ''; } if ($_POST['vehicle-midplate'] == 'Yes') { $midplate_no = ''; $midplate_yes = 'checked'; } } $note = '<html> <head> <title>Converter Application Form</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="http://www.transmission-specialties.com/catalog/custom/styles.css"> </head> <body bgcolor="#FFFFFF" text="#000000"> <div id="Background" style="position:absolute; width:672px; z-index:1; left: 48; top: 12"> <img src="http://www.transmission-specialties.com/catalog/custom/black_bar.png"> <img src="http://www.transmission-specialties.com/catalog/custom/red_bar.png"> <div class="Title" style="position:relative; top: 5;">CONVERTER APPLICATION FORM</div> <div class="Head" style="position:relative; top: 28;">Engine:</div> <div class="Form"> <table border="0" cellspacing="0" cellpadding="5"> <tr class="label"><td>Size: <input type="text" name="engine_size" size="7" value="'.@$_POST['engine_size'].'"> ci Compression Ratio: <input type="text" name="engine_cr" size="7" value="'.@$_POST['engine_cr'].'"> to 1 </td></tr> <tr class="label"><td>Dyno Tested: <input type="radio" name="dyno_test" value="Yes" '.$dyno_yes.'> Yes <input type="radio" name="dyno_test" value="No" '.$dyno_no.'> No </td></tr> <tr class="label"><td>Peak HP: <input type="text" name="engine_hp1" size="7" value="'.@$_POST['engine_hp1'].'"> to <input type="text" name="engine_hp2" size="7" value="'.@$_POST['engine_hp2'].'"> RPM </td></tr> <tr class="label"><td>Approx Tork: <input type="text" name="engine_tork1" size="7" value="'.@$_POST['engine_tork1'].'"> ft.lbs. at <input type="text" name="engine_tork2" size="7" value="'.@$_POST['engine_tork2'].'"> RPM </td></tr> <tr><td><img src="http://www.transmission-specialties.com/catalog/custom/h2_black_bar.png"> </td></tr> <tr class="label"><td>Cam Specs: (intake) Lift <input type="text" name="engine_cam_lift" size="7" value="'.@$_POST['engine_cam_lift'].'"> Duration <input type="text" name="engine_cam_duration" size="7" value="'.@$_POST['engine_cam_duration'].'"> </td></tr> <tr class="label"><td>@ .050: (intake) Lift <input type="text" name="engine_cam_lift05" size="7" value="'.@$_POST['engine_cam_lift05'].'"> Duration <input type="text" name="engine_cam_duration05" size="7" value="'.@$_POST['engine_cam_duration05'].'"> </td></tr> <tr><td><img src="http://www.transmission-specialties.com/catalog/custom/h2_black_bar.png"> </td></tr> <tr class="label"><td>Specified Cam RPM (power) Range <input type="text" name="engine_cam_pwr1" size="7" value="'.@$_POST['engine_cam_pwr1'].'"> to <input type="text" name="engine_cam_pwr2" size="7" value="'.@$_POST['engine_cam_pwr2'].'"> </td></tr> <tr class="label"><td>Carb Setup: Size: <input type="text" name="engine_carb_size" size="7" value="'.@$_POST['engine_carb_size'].'"> Qty: <input type="radio" name="num_carbs" value="1" '.$carb_1.'> 1 or <input type="radio" name="num_carbs" value="2" '.$carb_2.'> 2 carbs </td></tr> <tr class="label"><td>Alco/Gas: <select name="fuel"><option '.$alco.'>Alcohol</option><option '.$gas.'>Gasoline</option></select> Other Intake: <input type="text" name="engine_other_intake" size="7" value="'.@$_POST['engine_other_intake'].'"> </td></tr> <tr class="label"><td>Nitrous Oxide: No <input type="radio" name="nitrous" value="No" '.$nox_no.'> or <input type="radio" name="nitrous" value="Yes" '.$nox_yes.'> Yes Added HP: 1st Stage <input type="text" name="engine_added_hp1" size="7" value="'.@$_POST['engine_added_hp1'].'"> </td></tr> <tr class="label"><td> 2nd Stage <input type="text" name="engine_added_hp2" size="7" value="'.@$_POST['engine_added_hp2'].'"> </td></tr> <tr class="label"><td>Manifold: <input type="radio" name="manifold" value="cast" '.$man_cast.'> cast <input type="radio" name="manifold" value="sheet metal" '.$man_sheet.'> sheet metal <input type="radio" name="manifold" value="other" '.$man_other.'> Other <input type="text" name="engine_manifold" size="7" value="'.@$_POST['engine_manifold'].'"> </td></tr> <tr class="label"><td>Type of Cylinder Heads: <input type="text" name="engine_heads" size="45" value="'.@$_POST['engine_heads'].'"> <div class="Head" style="position:relative; left: -130; top: 3; padding: 11 0 0 0; height: 12;"><img src="http://www.transmission-specialties.com/catalog/custom/thin_black_bar.png"><div style="position: relative; padding: 0 0 0 0; top: 18; height: 20; width: 40;">Trans:</div></div> </td></tr> <tr class="label"><td>Type: <input type="text" name="trans_type" size="35" value="'.@$_POST['trans_type'].'"> 1st Gear Ratio: <input type="text" name="trans_ratio" size="7" value="'.@$_POST['trans_ratio'].'"> </td></tr> <tr class="label"><td>Input Spline: <input type="text" name="trans_input" size="27" value="'.@$_POST['trans_input'].'"> Trans-brake: <input type="radio" name="trans-brake" value="Yes" '.$trans_brake_yes.'> Yes <input type="radio" name="trans-brake" value="No" '.$trans_brake_no.'> No </td></tr> <tr class="label"><td>Flexplate Size: <input type="text" name="trans_flexplate" size="7" value="'.@$_POST['trans_flexplate'].'"> # teeth/dia. Bolt Hole Dia: <input type="text" name="trans_bolt_size" size="7" value="'.@$_POST['trans_bolt_size'].'"> in. <div class="Head" style="position:relative; left: -130; top: 3; padding: 11 0 0 0; height: 12;"><img src="http://www.transmission-specialties.com/catalog/custom/thin_black_bar.png"><div style="position: relative; padding: 0 0 0 0; top: 18; height: 20; width: 40;">Vehicle:</div></div> </td></tr> <tr class="label"><td>Type: <input type="text" name="vehicle_type" size="35" value="'.@$_POST['vehicle_type'].'"> Weight (w/driver): <input type="text" name="vehicle_weight" size="7" value="'.@$_POST['vehicle_weight'].'"> lbs. </td></tr> <tr class="label"><td>Rear Axle Ratio: <input type="text" name="vehicle_ratio" size="23" value="'.@$_POST['vehicle_ratio'].'"> </td></tr> <tr class="label"><td>Tire Size: <input type="text" name="vehicle_tire_size" size="7" value="'.@$_POST['vehicle_tire_size'].'"> dia x <input type="text" name="vehicle_tire_width" size="7" value="'.@$_POST['vehicle_tire_width'].'"> width </td></tr> <tr class="label"><td>Shifter Type: <input type="text" name="vehicle_shifter" size="27" value="'.@$_POST['vehicle_shifter'].'"> Mid-plate: <input type="radio" name="vehicle-midplate" value="No" '.$midplate_no.'> No <input type="radio" name="vehicle-midplate" value="Yes" '.$midplate_yes.'> Yes </td></tr> <tr class="label"><td>Midplate Thickness: <input type="text" name="vehicle_midplate_thickness" size="7" value="'.@$_POST['vehicle_midplate_thickness'].'"> in. <div class="Head" style="position:relative; left: -130; top: 3; padding: 11 0 0 0; height: 12;"><img src="http://www.transmission-specialties.com/catalog/custom/thin_black_bar.png"><div style="position: relative; padding: 0 0 0 0; top: 18; height: 20; width: 40;">Operation:</div></div> </td></tr> <tr class="label"><td>Starting Line RPM: <input type="text" name="oper_start_rpm" size="20" value="'.@$_POST['oper_start_rpm'].'"> Shift Point RPM: <input type="text" name="oper_shift_rpm" size="7" value="'.@$_POST['oper_shift_rpm'].'"> </td></tr> <tr class="label"><td>Class: <input type="text" name="oper_class" size="33" value="'.@$_POST['oper_class'].'"> Track Length: <input type="text" name="oper_track_length" size="7" value="'.@$_POST['oper_track_length'].'"> <div class="Head" style="position:relative; left: -130; top: 3; padding: 11 0 0 0; height: 12;"><img src="http://www.transmission-specialties.com/catalog/custom/thin_black_bar.png"><div style="position: relative; padding: 0 0 0 0; top: 18; height: 20; width: 40;">Customer:</div></div> </td></tr> <tr class="label"><td>Name: <input type="text" name="customer_name" size="33" value="'.@$_POST['customer_name'].'"> Phone: <input type="text" name="customer_phone" size="15" value="'.@$_POST['customer_phone'].'"> </td></tr> <tr class="label"><td>Address: <textarea name="customer_address" cols="33" rows="3" wrap="OFF">'.@$_POST['customer_address'].'</textarea> </td></tr> </table> </div> </div> </body> </html>'; $text = $note; // Add message body $mime->setTXTBody($text); $html = '<html><body>'.$note.'</body></html>'; $mime->setHTMLBody($html); // Get Headers and Body MIME formatted $body = $mime->get(); $headers = $mime->headers($headers); $message =& Mail::factory('[email protected]', [email protected], [email protected], [email protected]); $message->send($recipient, $headers, $body); echo ' <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <head> <title>Converter Application Form</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="http://www.transmission-specialties.com/catalog/custom/styles.css"> </head> <body bgcolor="#FFFFFF" text="#000000"> <div id="Background" style="position:absolute; width:672px; z-index:1; left: 48; top: 12"> <img src="http://www.transmission-specialties.com/catalog/custom/black_bar.png"> <img src="http://www.transmission-specialties.com/catalog/custom/red_bar.png"> <div class="Title" style="position:relative; top: 5;">CONVERTER APPLICATION FORM</div> <div class="Head" style="position:relative; top: 28;">Thank You!</div> <div class="Form" style="position:relative; top: 28; width: 540px;"><p>Your application form has been submitted for expert evaluation. We will contact you shortly to discuss your requirements.</p> <a href="http://www.transmission-specialties.com/catalog/">Click this link to return to our catalog.</a></div> </div> </body> </html> '; ?> Link to comment https://forums.phpfreaks.com/topic/111650-desperate-newbie-send-mail-format/ Share on other sites More sharing options...
trq Posted June 24, 2008 Share Posted June 24, 2008 What does the error say? Link to comment https://forums.phpfreaks.com/topic/111650-desperate-newbie-send-mail-format/#findComment-573094 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.