NMS error not submitting emails

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
jbogard

NMS error not submitting emails

Post by jbogard »

I am getting the following error - running windows 2003 PHP 5 Mysql 5
Using CMSMailer SMTP Have set everything up as instructed in both NMS and CMSMailer

Everything else I have installed runs great except this :(

http://www.blueleafgraphics.com/index.p ... EWSLETTERS


PHP Fatal error: Call to undefined function: checkdnsrr() in d:\home\hnt20a098\modules\NMS\NMS.module.php on line 1588



/* ------------------
HELPER FUNCTIONS
------------------ */
function check_email_mx($email) {
if( ((preg_match('/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/', $email)) ||
(preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/',$email))) && strlen($email) > 5 ) {
$host = explode('@', $email);
//disabled here because windows machines can't use checkdnsrr.
if (strrpos(strtolower($_SERVER['SERVER_SOFTWARE']), "win") === true){
return true;
}else{
Line 1588------------------ if(checkdnsrr($host[1].'.', 'MX') ) return true;
if(checkdnsrr($host[1].'.', 'A') ) return true;
  if(checkdnsrr($host[1].'.', 'CNAME') ) return true;
}
}
return false;
}
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: NMS error not submitting emails

Post by calguy1000 »

Note, not all servers return something containing "win" in the "SERVER_SOFTARE" field.  others return "Microsoft IIS" or some such thing.

It may be better to either abort this function, and always return true, or to use one of the freeware replacements available on php.net, etc.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “CMSMS Core”