SMTP Problem (Windows)
Posted: Tue Oct 11, 2005 2:47 pm
feyd | Please use
Thanks in advance for any help, suggestion and advice.
Kind Regards,
Steven
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hi,
I keep geeting an error message when trying to send an email using PHP on a Windows server and cant find the problem. I would really appreicate any help given. I get the follwong error message:
Warning: mail() [function.mail]: SMTP server response: 501 Bad address syntax in E:\SSLRoot\premier\includes\order_update_email.php on line 57.
My email script is as follows:Code: Select all
<?php
$email = $rows['customer_email_address'];
//5)email confirmations to us and to the customer
/* recipients */
$to = "<" . $email .">";
/* subject */
$subject = "Order Status Update";
/* message */
/* top of message */
$message = "
<html>
<head>
<title>Order Status Update Confirmation</title>
</head>
<body>
<p>Dear $customer_title $customer_firstname $customer_lastname,</p>
<p>Your order status has been updated and is due to be dispatched on $dispatch_date and is due for delivery on $delivery_date. If you have any queries,
please contact our customer services department.</p>
<table width=\"50%\" border=\"0\">
<tr>
<td>
<p>Order Number:";
$message .= " ";
$message .= $order_id;
$message .= "<br>";
$message .= "Customer Number:";
$message .= " ";
$message .= $customer_id;
$message .= "<br>";
$message .= "Order status:";
$message .= " ";
$message .= $customer_message;
$message .= " ";
$message .= "<p>";
$message .= "
</td>
</tr>
</table>
</body>
</html>";
/* headers */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: <ecommerce@christmastreeland.co.uk>\r\n";
$headers .= "Cc: <dianne@rainford.com>\r\n";
$headers .= "X-Mailer: PHP / ".phpversion()."\r\n";
/* mail it */
mail($to, $subject, $message, $headers);
?>Kind Regards,
Steven
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]