strife22002 Posted February 12, 2010 Share Posted February 12, 2010 Hello, I created a php form and it seems like it is submitting properly but the results never get emailed to me. I am hosting with goDaddy.com on a Windows server with php 5.2.5 installed. My code is below. Any ideas why nothing is coming through? Thanks in advance. <?php /* This first bit sets the email address that you want the form to be submitted to. You will need to change this value to a valid email address that you can access. */ $webmaster_email = "[email protected]"; /* This bit sets the URLs of the supporting pages. If you change the names of any of the pages, you will need to change the values here. */ $feedback_page = "register.html"; $thankyou_page = "thank_you.html"; /* This next bit loads the form field data into variables. If you add a form field, you will need to add it here. */ $team = $_REQUEST['team'] ; $local = $_REQUEST['local'] ; $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $phone = $_REQUEST['phone'] ; $altname = $_REQUEST['altname'] ; $altemail = $_REQUEST['altemail'] ; $division = $_REQUEST['division'] ; // If the user tries to access this script directly, redirect them to the feedback form, if (!isset($_REQUEST['email'])) { header( "Location: $feedback_page" ); } $subject = "2010 Softball Registration"; $message = "2010 Softball Registration Team Name: $team Team Location: $local Contact Name: $name Contact Email: $email Contact Phone: $phone Alternative Contact Name: $altname Alternative Contact Email: $altemail Entry Division: $division End of message"; $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); // If we passed all previous tests, send the email then redirect to the thank you page. mail( $webmaster_email, $subject, $message, $headers); header( "Location: $thankyou_page" ); ?> Link to comment https://forums.phpfreaks.com/topic/191854-form-submission-problem/ Share on other sites More sharing options...
teamatomic Posted February 12, 2010 Share Posted February 12, 2010 I comment out your initial isset redirect, put in my addy and it sends fine. Is the email address [email protected]. There is a possibility, although a slim one, that the server will not allow a message to be sent to itself. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/191854-form-submission-problem/#findComment-1011214 Share on other sites More sharing options...
strife22002 Posted February 12, 2010 Author Share Posted February 12, 2010 I comment out your initial isset redirect, put in my addy and it sends fine. Is the email address [email protected]. There is a possibility, although a slim one, that the server will not allow a message to be sent to itself. HTH Teamatomic Thank you for the reply teamatomic. A friend of mine tried it on his end with his address as well and he told me that it worked just fine also. I called goDaddy and exhausted all of their tech support and they had no answers for me either. I honestly thought it was the code but now I think it has to be something weird on the mail server side. I am officially clueless. Thanks again for the help. Link to comment https://forums.phpfreaks.com/topic/191854-form-submission-problem/#findComment-1011222 Share on other sites More sharing options...
teamatomic Posted February 12, 2010 Share Posted February 12, 2010 Put in your address and see if you can send a simple test out. If that does not work get a gmail account, I understand you can use them as SMTP. mail("[email protected]", "My Subject", "Line 1\nLine 2\nLine 3"); HTH TEamatomic Link to comment https://forums.phpfreaks.com/topic/191854-form-submission-problem/#findComment-1011225 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.