MikeTheVet Posted January 26 Posted January 26 Hi All, I'm fairly new to this, and trying to get a action.php to process a form and send an email to the user. //$EmailAddress is set by a form input //$sendFrom is set by the refering form //$body is build by form inputs and other information //$subject is build by refering page $headers = "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "From: " . $sendFrom ."\n"; $headers .= "Reply-to:" . $sendFrom ."\n"; $headers .= "X-Priority: 3\n"; $headers .= "X-Mailer: PHP4\n"; if (mail($EmailAddress, $subject, $body, $headers)){ print "<a href='login.php'>Login</a><br>"; print "Your password was emailed to you. Please check your email within a few minutes."; } else{ print "Your password could not be emailed.. Please contact your system admin or try again."; exit; } With the if statement in, all it does is spin with no email sent. When I comment out the if block, the form works. Any suggestions on how to fix this? Quote
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.