Jump to content

mail() not sending?


Kenny Pollock

Recommended Posts

Code is below. I have if ( mail () ) and it's showing the successful message... but when I check my email inbox... no emails

 

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$msg = "<b>ORIGIN</b><br>Company: " . $_POST['origin_company'] . "<br>Address: " . $_POST['origin_address'] . "<br>City: " . $_POST['origin_city'] . "<br>State: " . $_POST['origin_state'] . "<br>Zip Code: " . $_POST['origin_zip'] . "<br>Phone #: " . $_POST['origin_phone'] . "<br>Cell Phone #: " . $_POST['origin_cell_phone'] . "<br>Work Phone #: " . $_POST['origin_work_phone'] . "<br>Contact: " . $_POST['origin_contact'] . "<br>Ready Date: " . $_POST['pickup_date'] . "<br><br><b>DESTINATION</b><br>Company: " . $_POST['destination_company'] . "<br>Address: " . $_POST['destination_address'] . "<br>City: " . $_POST['destination_city'] . "<br>State: " . $_POST['destination_state'] . "<br>Zip Code: " . $_POST['destination_zip'] . "<br>Phone #: " . $_POST['destination_phone'] . "<br>Cell Phone #: " . $_POST['destination_cell_phone'] . "<br>Work Phone #: " . $_POST['destination_work_phone'] . "<br>Contact: " . $_POST['destination_contact'] . "<br>";

foreach ($_POST['make'] as $x=>$value) { 
$msg .= "VIN #: " . $_POST['vin'][$x] . "<br>Color: " . $_POST['color'][$x] . "<br>" . $_POST['yr'][$x] . " " . $_POST['make'][$x] . " " . $_POST['model'][$x] . "<br>Operable?" . $_POST['op'][$x] . "<br>";
}

if ( mail('[email protected]', 'Order from the website', $msg, $headers) )
{
	echo '<h2>Order Complete</h2><p>You will be contacted shortly to finalize the details.</p>';
}

Link to comment
https://forums.phpfreaks.com/topic/99675-mail-not-sending/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.