ronnie88 Posted July 25, 2009 Share Posted July 25, 2009 Script redirects fine but I do not get the email any help? <?php header( 'Location: XXXX' ) ; /////////// Getting the form values///////// $username = $_POST['username']; $email_address = $_POST['email']; $ip_address = $_POST['ip_address']; $iptype = $_POST['iptype']; $userlocation = $_POST['userlocation']; $extrainformation = $_POST['extrainformation']; /////////// Checking for Email Injection///////// if ( ereg( "[\r\n]", $username ) || ereg( "[\r\n]", $email_address ) ) { header('Location: XXXX' ); } /////////// Making the Email Message///////// $email_from = $username; $email_subject = "Password Reset Request"; $email_body = "You have received a new message. Here are the details: Name = " . $username . ", Postal Address = " . $email_address . ", IP Address = " . $ip_address . ",IP Type = " . $iptype . ", User Location = " . $userlocation . ", Extra Information = " . $extrainformation; /////////// Sending the Email using the mail() function///////// $to = "it@supclan.com"; $headers = "From: $email_from"; mail($to,$email_subject,$email_body,$headers); echo "Your message was sent successfully"; ?> Quote Link to comment Share on other sites More sharing options...
Amtran Posted July 25, 2009 Share Posted July 25, 2009 Make sure your server has SMTP and PHP mail capabilities. If that evaluates to true, try running a test script to make sure it's a problem with the script and not PHP or your server. 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.