Jump to content

[SOLVED] Why is this duplicating the email?


guymclaren

Recommended Posts

// From email address
$from = "xxx@xxxx";
$from_name = "xxxxx";

// The message
$subject = "Your ORDER needs confirming";
$message = "
<html>
<head>
  <title>Order Confirmation, webTECH.co.za</title>
</head>
<body>
  <p>Dear $fname</p>
<p>You are receiving this email because you have just placed an order for a website at webTECH</p>
<p>Please confirm this order by clicking the link below this.<br>
<a href=\"http://webtech.co.za/confirm.php?id=$affid&pay=$pay\">www.webtech.co.za/confirm.asp?id=$affid</a></p>
<p>Regards</p>
<p>webTECH</p>
<p>Tel 013 745 8337</p>
<p>Cell 071 604 7754</p>	
</body>
</html>
";


// Headers
// To send HTML mail, the Content-type header must be set
$headers = "To: ".$fname."<".$email.">" . "\r\n";
$headers .= "From: ".$from_name." <".$from.">" . "\r\n";
$headers .= "Date: ".date("r") . "\r\n";

// Additional headers
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "Message-Id: <".md5(uniqid(microtime()))."@".$_SERVER["SERVER_NAME"].">\r\n";

// Send the mail
mail($email, $subject, $message, $headers);

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.