
Originally Posted by
traq
I missed a couple newlines between the headers.
Code:
//email to customer
$to = $EmailAddress;
$subject = 'Successful Order from webshop';
$message = '<html>
<body bgcolor="#573A28" topmargin="25">
Put HTML content here with variables from PHP if you like
Variable display Example: ' . $OrderID . '
</body>
</html>';
$headers = 'From: shop@webshop.com' . "\r\n" .
'Reply-To: noreply@webshop.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion(). "\r\n";
"Mime-version: 1.0\r\n" .
"Content-type: text/html; charset=UTF-8\r\n";
mail($to, $subject, $message, $headers);
thanks for your help so far, i am still having an issue echoing the results out. i modified your code earlier as was looking on the php.net site but i think the issue is the variable and where the speech marks etc go
Code:
// multiple recipients
$to = $row_rsEvent['BillingEmail'] . ', '; // note the comma
$to .= 'email@domain.com';
// subject
$subject = 'Your Order Confirmation ';
// message
$message = "
<html>
<head>
<title>Your Order has been successful</title>
</head>
<body>
<img src='http://www.webshop.com/images/email-logo.jpg'/>
<p>Thank you for your order, the order details are below,</p>
<table width='600' border='1' cellpadding='10'>
<tr>
<td><p>Order ID</p></td>
<td><p>".$row_rsEvent['OrderID']."</p></td>
</tr>
<tr>
<td>Total Amount</td>
<td>".$row_rsEvent['Total']."</td>
</tr>
<tr>
<td>Description Primary Order</td>
<td></td>
<td>".$row_rsEvent['event_desc']."</td>
</tr>
</table>
<p>you will be contacted by us shortly</p>
<p>thanks</p>
<p>webshop</p>
<p>name</p>
</body>
</html>
";
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: Jakes <jake@domain.com>, dan <dan@domain>' . "\r\n";
$headers .= 'From: <shop@webshop.com>' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
Bookmarks