Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Email form not working
04-27-2014, 02:09 AM #1
- Join Date
- Apr 2010
- Thanked 102 Times in 101 Posts
Email form not working
This is the weirdest thing. I use this same coding on one of my websites and it works fine, however I am using it on a different one now and it doesn't work, I don't get the email. I am sure this is probably outdated coding, if there is a better and faster way to send an email I'd love to hear it. But do you see any problems? Thanks!
//define the receiver of the email
$to = "$email";
//define the subject of the email
$subject = 'Verify your Account';
//define the message to be sent. Each line should be separated with \n
$message = "This message was sent from NewRodGame.com. If you didn't create an account here, please disregard this email. \n\n In order to start playing you must verify your account. Please go to <a href='http://www.newrodgame.com>Realm of Dragons</a>, log in and type in your verification code to start playing.\n\n Your Verification Code: <b>$verifycode</b>";
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: Realm of Dragons\r\nReply-To: firstname.lastname@example.org";
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers );
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed"
echo $mail_sent ? "<h3>A verification code has been sent to the email address you registered with it. Please check your spam folder, it may take up to 10 minutes to arrive. Follow the instructions in the email to access your account and start playing. If you have any problems, please contact us.</h3>" : "A problem happened with sending an email. Please try again.";
EDIT: It appears to be working but it took 10 minutes. Any way to make it more instant?
Last edited by myfayt; 04-27-2014 at 02:22 AM.Been a sign maker for 7 years. My business:
American Made Signs