Changeset 2356
- Timestamp:
- 03/26/2008 03:48:07 PM (8 months ago)
- Files:
-
- 1 modified
-
trunk/system/helpers/valid.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/helpers/valid.php
r2263 r2356 24 24 25 25 /** 26 * Validate the domain of an email address by checking if the domain has a 27 * valid MX record. 28 * 29 * @param string email address 30 * @return boolean 31 */ 32 public static function email_domain($email) 33 { 34 // Check if the email domain has a valid MX record 35 return (bool) checkdnsrr(preg_replace('/^.+@(.+)$/', '$1', $email), 'MX'); 36 } 37 38 /** 26 39 * Validate email, RFC compliant version 27 40 * Note: This function is LESS strict than valid_email. Choose carefully.
