KaineBennett Posted August 22, 2014 Share Posted August 22, 2014 Hey guys, On my game which is running the RC Engine, the home.php and register.php worked fine, havent touched it and it just says this to users whenever they try to sign up... It has only been open for 3 days and its only just doing the error. this is the error: There was an error with your email, Please try again. »Okay And I think it is coming from this bit: $message = "Hello ".$_POST['name'].",\n\n Your email address has been used for an account on Criminal-City.\n If this was not you please ignore this email."; if(!mail($_POST['email'], "Thank you for signing up to Criminal-City", $message, "From: [email protected]")) { echo " There was an error with your email, Please try again.<br/> »<a href='home.php"; if($_GET['PID']) { echo '?PID=' . $_GET['PID']; } echo "'>Okay</a>"; } else { Quote Link to comment Share on other sites More sharing options...
sniko Posted August 22, 2014 Share Posted August 22, 2014 (edited) I really hope you're sanitizing _POST's. As that would just throw your "There are no SQL vulnerabilities" claim straight out the water Why are you hard-coding parameters; like the "From" field, and the "Subject" field? Why are you mixing a lot of HTML with your model/back-end logic? Why are you relying on mail()?Putting it in an if() statement doesn't notify you if the e-mail gets delivered, if mail() returns TRUE Why are you not either passing the e-mail to a 3rd party, or a library - SwiftMailer for example? It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination. Honestly, there are some questionable methods in the 10 lines you've posted, I can't wait to play and see the source of RC engine 2.0. Further, Make sure your subject fields complies with RFC-2047 standards. Your mail body doesn't comply with the notes in the manual. "Each line should be separated with a CRLF (\r\n). Lines should not be larger than 70 characters." But, To answer your question; Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise. Ensure port 25 isn't blocked Ensure your mail service is running Look at the maillog, and see why it wasn't accepted for delivery Have you configured your mail service? Edited August 22, 2014 by sniko Quote Link to comment Share on other sites More sharing options...
Legaci Posted December 23, 2014 Share Posted December 23, 2014 (edited) LOL funny :P made me laugh thanks sniko.. you can see rc 2.0 at http://www.university-of-the-streets.com just saying :P hahahaa Edited December 23, 2014 by Legaci Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.