jblack Posted November 16, 2006 Share Posted November 16, 2006 Alright, so I cut out everything that isn't important.What happens here is that it doesn't send the email, I've echoedthe script out to see whats up with it, but I still can't find out whyit won't email. I do have my own email to be sent from also, sodon't crit me about that. It worked fine a little bit ago, but it stoppedall the sudden and I can't figure out why... <?$from = "no-reply@etherea.obliviousrealms.com";$subject = "Etherea Web Activation"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "From: Web Master $from \n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";$message = "Thank you for registering at Etherea Web, $username.<br>";$message .= "The following is the information you registered with: <br>";$message .= "<b>Username:</b> $username <b>Password:</b> $password <br><br>";$message .= "Your account is not currently activated. Click the following link to activate your account:<br>";$message .= "<a href='http://etherea.obliviousrealms.com/activation.php?name=$username&code=$code'>http://etherea.obliviousrealms.com/activation.php?name=$username&code=$code</a>";if(mail($email,$subject,$message,$headers)) {echo "You have successfully registered. An email is being sent to you for activation of this account.<br>";}}?> Link to comment Share on other sites More sharing options...
jesh Posted November 16, 2006 Share Posted November 16, 2006 In the last part of the code, does mail($email,$subject,$message,$headers) return true so that you see the "You have successfully registered...." message? Or does it return false? Link to comment Share on other sites More sharing options...
justsomeguy Posted November 16, 2006 Share Posted November 16, 2006 I think the from header needs to be like this:$headers .= "From: Web Master <$from> \n";And you also need to separate it with \r\n, not just \n. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now