note 23878 deleted from function.getmxrr by didou

From: Date: Tue, 20 Apr 2004 23:05:01 +0000
Subject: note 23878 deleted from function.getmxrr by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-68390@lists.php.net to get a copy of this message
Note Submitter: mad-generic@NOSPAMnetilium.org ---- If this function is going to be used for e-mail validation purposes; Please bear in mind that MX records are not mandatory and that RFC974 clearly states: If no MX records exist for a given host, MTAs should interpret this as if there is one MX RR matching the host itself. (I.e. you should call gethostbyname() to see if the host has an A record.) <?php $host=$host."."; if ( getmxrr( $host, $mxhosts ) == FALSE && gethostbyname( $host ) == $host ) { echo "$host is not a valid e-mail host."; } else { echo "$host is a valid e-mail host."; } ?>

« previous php.notes (#68390) next »