guymclaren Posted September 18, 2008 Share Posted September 18, 2008 age // From email address $from = "xxx@xxx"; $from_name = "xxx xxx"; // The message $subject = "Your Affiliate application 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 registered as an affiliate at webTECH</p> <p>Please confirm this order by clicking the link below this.<br> <a href="http://webtech.co.za/confirm.asp?id=$uid&pay=$pay">www.webtech.co.za/confirm.asp?id=$uid</a></p> <p>Regards</p> <p>webTECH</p> <p>Tel 013 745 8337</p> <p>Cell 071 604 7754</p> </body> </html> '; /***********************************************/ /* No need to modify anything down here */ /* Note that these are needed to send the mail */ /***********************************************/ // 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); Dear $fname You are receiving this email because you have just registered as an affiliate at webTECH Please confirm this order by clicking the link below this. www.webtech.co.za/confirm.asp?id=$uid yes $fname and $uid are populated, I have checked. Why is this doing my head in like this? Link to comment https://forums.phpfreaks.com/topic/124854-solved-mail-problem-its-all-my-fault-i-should-not-be-trying-to-learn-new-stuff-at-my/ Share on other sites More sharing options...
aebstract Posted September 18, 2008 Share Posted September 18, 2008 When you do this: $message = ' Use " instead of ' and anywhere inside that you need to use a " make sure you comment it out \" like that. Link to comment https://forums.phpfreaks.com/topic/124854-solved-mail-problem-its-all-my-fault-i-should-not-be-trying-to-learn-new-stuff-at-my/#findComment-645029 Share on other sites More sharing options...
guymclaren Posted September 18, 2008 Author Share Posted September 18, 2008 Thank you, that seems to have resolved the issue. Link to comment https://forums.phpfreaks.com/topic/124854-solved-mail-problem-its-all-my-fault-i-should-not-be-trying-to-learn-new-stuff-at-my/#findComment-645045 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.