<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Checking email against DNS MX record</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Checking email against DNS MX record</description>
<language>en</language>
<pubDate>Sat, 20 Jun 2026 18:37:23 +0000</pubDate>

<item>
<title>yuniar on "Checking email against DNS MX record"</title>
<link>https://www.machform.com/forums/topic/checking-email-against-dns-mx-record#post-10196</link>
<pubDate>Sat, 14 Aug 2010 18:29:25 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10196@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hmm.. have you checked if the function checkdnsrr($domain,'MX') already worked fine on your site?&#60;/p&#62;
&#60;p&#62;If you are using Windows server, this function only available since PHP 5.3.0
&#60;/p&#62;</description>
</item>
<item>
<title>vern1271 on "Checking email against DNS MX record"</title>
<link>https://www.machform.com/forums/topic/checking-email-against-dns-mx-record#post-10189</link>
<pubDate>Fri, 13 Aug 2010 21:03:47 +0000</pubDate>
<dc:creator>vern1271</dc:creator>
<guid isPermaLink="false">10189@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;No luck... Anyone else ever implement this and get it working?
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Checking email against DNS MX record"</title>
<link>https://www.machform.com/forums/topic/checking-email-against-dns-mx-record#post-10188</link>
<pubDate>Fri, 13 Aug 2010 19:21:35 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10188@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Try changing your function to become like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function domain_exists($value) {

$value = $value[0];
list($user,$domain) = split(&#38;#39;@&#38;#39;,$value);

if (!checkdnsrr($domain,&#38;#39;MX&#38;#39;)) {
   return &#38;#39;Sorry, This domain is not valid&#38;#39;;
} else {
   return true;
}

}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;`
&#60;/p&#62;</description>
</item>
<item>
<title>vern1271 on "Checking email against DNS MX record"</title>
<link>https://www.machform.com/forums/topic/checking-email-against-dns-mx-record#post-10181</link>
<pubDate>Fri, 13 Aug 2010 02:43:00 +0000</pubDate>
<dc:creator>vern1271</dc:creator>
<guid isPermaLink="false">10181@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I'm trying to add DNS MX validation and I must be missing something, because I can't get it to work...&#60;/p&#62;
&#60;p&#62;In the common-validator.php file after line 28, I added the following...&#60;/p&#62;
&#60;p&#62;//validate DNS MX record&#60;br /&#62;
	function domain_exists($value) {&#60;/p&#62;
&#60;p&#62;		list($user,$domain) = split('@',$value);&#60;/p&#62;
&#60;p&#62;		if (!checkdnsrr($domain,'MX')) {&#60;br /&#62;
				return 'Sorry, This domain is not valid';&#60;br /&#62;
			} else {&#60;br /&#62;
				return true;&#60;br /&#62;
			}		&#60;/p&#62;
&#60;p&#62;	}&#60;/p&#62;
&#60;p&#62;And in my post-functions.php file I added the following after $rules[$element_name]['email'] = true; on line 296 since I only want to do this on certain forms:&#60;/p&#62;
&#60;p&#62;if ($form_id == '3') {&#60;br /&#62;
	$rules[$element_name]['domain_exists'] = true;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;Any help would be appreciated.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
