Gary Posted March 17, 2011 Share Posted March 17, 2011 I have been spending several hours trying to troubleshoot the code in Script 13.6 - register.php and can't seem to find the solution. The script won't send the email using the following code: // Send the email. $body = "Thank you for registering at the User Registration site. To activate your account, please click on this link:\n\n"; $body .= "http://www.mywebsite.com/dispatch/activate.php" .mysql_insert_id() . "&y=$a"; mail($_POST['email'], 'Registration Confirmation', $body, 'From: admin@mywebsite.com'); // Finish the page. echo '<h3>Thank you for registering! A confirmation email has been sent to your address. Please click on the link in that email in order to activate your account.</h3>'; include ('./includes/footer.html'); // Include the HTML footer. exit(); } else { // If it did not run OK. echo '<p><font color="red" size="+1">You could not be registered due to a system error. We apologize for any inconvenience.</font></p>'; Can anyone help with ideas on what might be wrong? Thanks. Link to comment Share on other sites More sharing options...
Matthaus Posted March 17, 2011 Share Posted March 17, 2011 You don't mention a lot of crucial details. Without them it's impossible to help. Is your site on a remote webhost or being run locally? What OS is the script on? What version of PHP is being used? -matthaus 1 Link to comment Share on other sites More sharing options...
Gary Posted March 17, 2011 Author Share Posted March 17, 2011 You don't mention a lot of crucial details. Without them it's impossible to help. Is your site on a remote webhost or being run locally? What OS is the script on? What version of PHP is being used? -matthaus Thanks matthaus. I have part of it figured out. Took another look and now it's sending to two out of three emails. May actually be my email client. I'll check. Link to comment Share on other sites More sharing options...
Recommended Posts