This has been bugging me for a while now, we often get tickets with emails that don't have correct domains, eg hptmail.com or gmaii.com. A while back I looked at customizing the way email addresses are validated on new ticket creations, solved it today. Just replace the function is_email($email) { from class.validation.php in the includes directory with the following code.
Basically for anyone that doesn't know PHP, this function now uses a basic RegEx or regular expression match to look for a valid email address eg me@mydomain.com but then also now does an MX Record lookup to ensure that the domain exists.
function is_email($email) {$exp = "^+(+)*@(+(+))+$";if(eregi($exp,$email)){ if(checkdnsrr(array_pop(explode("@",$email)),"MX")){ return true; }else{ return false; } }else{ return false; }}
Your Welcome :-)
[class.validator.php.txt](https://forum.osticket.com/assets/files/migrated/FileUpload/15/7ee4a1effb0c4bb8a3a1c5e3eaa9a8.txt)