Could not find MX record for your domain -Error thrown?

Hi guys and gals,

I have tested 2 contact forms on a live “test” site @ www.bfdesigns.co.uk/epctest and both forms submit data fine to my personal email account.

The other live version of this site at the correct domain is www.myhomepotential.co.uk, and for some unknown reason the “order EPC” form when submitted throws a “Could not find MX record for your domain” error on screen.

The script below is the only change I have made from routing the form data to my personal email addy for testing.


$mailto = 'benji-83@hotmail.com' ;
$subject = "New EPC Client enquiry from myhomepotential Website" ;
$formurl = "http://bfdesigns.co.uk/epctest/order_epc.html" ;
$orderThankyouurl = "http://bfdesigns.co.uk/epctest/orderThankyou.html" ;
$orderErrorurl = "http://bfdesigns.co.uk/epctest/orderError.html" ;

Where as the code I changed too for the correct domain to route all form data to the clients email address is as follows:


$mailto = 'sales@myhomepotential.co.uk' ;
$subject = "New EPC Client enquiry from myhomepotential Website" ;
$formurl = "http://myhomepotential.co.uk/order_epc.html" ;
$orderThankyouurl = "http://myhomepotential.co.uk/orderThankyou.html" ;
$orderErrorurl = "http://myhomepotential.co.uk/orderError.html" 

I have attached a screen shot of the error thrown, but if anyone wishes to see it in the flesh visit: www.myhomepotential.co.uk/order_epc.html and submit the form.

The full form can be found here:


// ------------- CONFIGURABLE SECTION ------------------------

$mailto = 'sales@myhomepotential.co.uk' ;
$subject = "New EPC Client enquiry from myhomepotential Website" ;
$formurl = "http://myhomepotential.co.uk/order_epc.html" ;
$orderThankyouurl = "http://myhomepotential.co.uk/orderThankyou.html" ;
$orderErrorurl = "http://myhomepotential.co.uk/orderError.html" ;

$bName_is_required = 0;
$title_is_required = 0;
$fName_is_required = 0;
$lName_is_required = 0;
$custAddress_is_required = 0;
$custCityAndCount_is_required = 0;
$custPostC_is_required = 0;
$tDay_is_required = 0;
$tEve_is_required = 0;
$eMail_is_required = 0;
$aNumRdTwn_is_required = 0;
$cAndC_is_required = 0;
$propPostC_is_required = 0;
$pAccess_is_required = 0;
$contact_is_required = 0;
$contactName_is_required = 0;
$cTDay_is_required = 0;
$cTEve_is_required = 0;
$bedrooms_is_required = 0;
$floorplan_is_required = 0;
$output_is_required = 0;
$otherInfo_is_required = 0;
$tandc_is_required = 1;

$uself = 0;
$forcelf = 0;
$use_envsender = 0;
$use_sendmailfrom = 0;
$smtp_server_win = '' ;
$use_webmaster_email_for_from = 0;
$use_utf8 = 1;
$my_recaptcha_private_key = '' ;

// -------------------- END OF CONFIGURABLE SECTION ---------------

define( 'MAX_LINE_LENGTH', 998 );
$headersep = $uself ? "\
" : "\\r\
" ;
$content_nl = $forcelf ? "\
" : (defined('PHP_EOL') ? PHP_EOL : "\
") ;
$content_type = $use_utf8 ? 'Content-Type: text/plain; charset="utf-8"' : 'Content-Type: text/plain; charset="iso-8859-1"' ;
if ($use_sendmailfrom) {
	ini_set( 'sendmail_from', $mailto );
}
if (strlen($smtp_server_win)) {
	ini_set( 'SMTP', $smtp_server_win );
}
$envsender = "$mailto" ;
$bName = $_POST['bName'];
$title = $_POST['title'] ;
$fName = $_POST['fName'];
$lName = $_POST['lName'];
$custAddress = $_POST['custAddress'];
$custCityAndCount = $_POST['custCityAndCount'];
$custPostC = $_POST['custPostC'];
$tDay = $_POST['tDay'];
$tEve = $_POST['tEve'];
$eMail = $_POST['eMail'];
$aNumRdTwn = $_POST['aNumRdTwn'];
$cAndC = $_POST['cAndC'];
$propPostC = $_POST['propPostC'];
$pAccess = $_POST['pAccess'];
$contact = $_POST['contact'];
$contactName = $_POST['contactName'];
$cTDay = $_POST['cTDay'];
$cTEve = $_POST['cTEve'];
$bedrooms = $_POST['bedrooms'];
$floorplan = $_POST['floorplan'];
$output = $_POST['output'];
$otherInfo = $_POST['otherInfo'];
$tandc = $_POST['tandc'];

if ( preg_match( "/[\\r\
]/", $tandc ) ) {
	header( "Location: $orderErrorurl" );
	exit ;
}

$fromemail = $use_webmaster_email_for_from ? $mailto : $email ;

if (function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc()) {
	$comments = stripslashes( $comments );
}

$messageproper =
	"This message was sent from:" . $content_nl .
	"$http_referrer" . $content_nl .
	"-------------------------Clients Contact Details--------------------------------" . $content_nl .
	"Company name:                $bName" . $content_nl .
	"Clients Title:                $title" . $content_nl .
	"Clients First Name:           $fName" .  $content_nl . 
	"Clients Last Name:            $lName" .  $content_nl .
	"Clients Address:              $custAddress" .  $content_nl .
	"Clients City or County:       $custCityAndCount" .  $content_nl .
	"Clients Post Code:            $custPostC" .  $content_nl .
	"Clients Daytime Phone Number: $tDay" .  $content_nl .
	"Clients Evening Phone Number: $tEve" .  $content_nl .
	"Clients E-mail Address:       $eMail" .  $content_nl .
	"------------------Details of Property Requiring EPC-------------------------------" . $content_nl .
	"Properties Address:             $aNumRdTwn" .  $content_nl .
	"Properties City or County:      $cAndC" .  $content_nl .
	"Properties Post Code:           $propPostC" .  $content_nl .
	"Property Access:                $pAccess" .  $content_nl .
	"Contact is:                     $contact" .  $content_nl .
	"Contact Name:                   $contactName" .  $content_nl .
	"Contacts Daytime Phone Number:  $cTDay" .  $content_nl .
	"Contacts Evening Phone Number:  $cTEve" .  $content_nl .
	"Number of Bedrooms:             $bedrooms" .  $content_nl .
	"Is a floorplan required:        $floorplan" .  $content_nl .
	"EPC Total Price:                $output" .  $content_nl .
	"------------------------- Other Information -------------------------" . $content_nl . $content_nl .
	wordwrap( $otherInfo, MAX_LINE_LENGTH, $content_nl, true ) . $content_nl . $content_nl .
	"------------------------------------------------------------" . $content_nl .
	"Client agreed to Terms and Conditions:  $tandc" . $content_nl ;
	
$headers =
	"From: \\"$company\\" <$fromemail>" . $headersep . "Reply-To: \\"$company\\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.16.2" .
	$headersep . 'MIME-Version: 1.0' . $headersep . $content_type ;

if ($use_envsender) {
	mail($mailto, $subject, $messageproper, $headers, $envsender );
}
else {
	mail($mailto, $subject, $messageproper, $headers );
}
header( "Location: $orderThankyouurl" );
exit ;

I have been battling back and forth with the clients host querying them over this, and all they could really say on the matter was, and I quote:

“we have checked through your code and can see that you have not set an SMTP server. You would need to set this as localhost within your code.”

I have tried setting the line that states:

$smtp_server_win = '' ;

TOO

$smtp_server_win = 'localhost' ;

But this does nothing either, so Im at a real loss now what to do or who to turn too…

I look forward to hearing from anybody on this matter.

regards

Ben

That test address (http://www.myhomepotential.co.uk/order_epc.html) doesn’t work. But I wonder from the screen shot you posted if you have the live url redirected to a test environment on your computer. Not sure, but looking for something in C:\ looks wrong to me (unless this is Windows hosting …)