/** * Determines if the email address is an email address in an open domain. These are * addresses that users can sign up for, typically free. They then has to login to * these address to get the emails. These are not considered to be * disposable emails, however, if the application is providing a free * trial for an expensive server, then users can signup for more accounts * to get further trials. * * If applications are to block these addresses, it is important to be aware * that some users use open webmail as their primary email and that such * service providers include hotmail, gmail, and yahoo. * * @param $p_email The email address to check. * @returns true: open domain email, false: otherwise. */ function is_open_email($p_email) { $t_domain = DisposableEmailChecker::_get_domain_from_address($p_email); return in_array($t_domain, DisposableEmailChecker::$open_domains_array); }
/** * Determines if the email address is an email address in an open domain. These are * addresses that users can sign up for, typically free. They then has to login to * these address to get the emails. These are not considered to be * disposable emails, however, if the application is providing a free * trial for an expensive server, then users can signup for more accounts * to get further trials. * * If applications are to block these addresses, it is important to be aware * that some users use open webmail as their primary email and that such * service providers include hotmail, gmail, and yahoo. * * @param $p_email The email address to check. * @returns true: open domain email, false: otherwise. */ public static function is_open_email($p_email) { $t_domain = DisposableEmailChecker::_get_domain_from_address($p_email); if (DisposableEmailChecker::$open_domains_array === null) { DisposableEmailChecker::$open_domains_array = DisposableEmailChecker::_load_file('open_domains'); } return in_array($t_domain, DisposableEmailChecker::$open_domains_array); }
/** * Determines if the email address is a free email address. These are * addresses that users can sign up for free. They then has to login to * these address to get the emails. These are not considered to be * disposable emails, however, if the application is providing a free * trial for an expensive server, then users can signup for more accounts * to get further trials. * * If applications are to block these addresses, it is important to be aware * that some users use free webmail as their primary email and that such * service providers include hotmail, gmail, and yahoo. */ function is_free_email($p_email) { $t_domain = DisposableEmailChecker::_get_domain_from_address($p_email); switch ($t_domain) { case 'gmail.com': case 'googlemail.com': case 'hotmail.com': case 'yahoo.com': case 'msn.com': case 'hotmail.de': case 'hotmail.fr': case 'hotmail.it': case 'hotmail.co.uk': case 'msn.co.uk': case 'pancakemail.com': case 'gawab.com': case 'yahoo.com.au': case 'yahoo.com.cn': case 'yahoo.co.uk': case 'yahoo.com.hk': case 'yahoo.com.ar': case 'yahoo.com.br': case 'yahoo.com.mx': case 'yahoo.com.asia': case 'yahoo.co.jp': case 'yahoo.com.malaysia': case 'yahoo.com.ph': case 'yahoo.com.sg': case 'yahoo.com.tw': case 'yahoo.com.vn': case 'yahoo.com.es': case 'yahoo.fr': case 'yahoo.ie': case 'yahoo.de': case 'yahoo.ca': case 'talk21.com': case 'BTinternet.com': case 'lycos.co.uk': case 'lycos.it': case 'lycos.es': case 'lycos.de': case 'lycos.at': case 'lycos.nl': case 'caramail.com': case 'mail.com': case 'libero.it': case 'iol.it': case 'blu.it': case 'aol.com': case 'aim.com': case 'netscape.com': case 'netscape.net': case 'mail.ru': case 'inbox.ru': case 'bk.ru': case 'list.ru': case 'rediffmail.com': case 'hanmail.net': case 'webmail.co.za': case 'exclusivemail.co.za': case 'executive.co.za': case 'homemail.co.za': case 'magicmail.co.za': case 'mailbox.co.za': case 'ravemail.co.za': case 'starmail.co.za': case 'thecricket.co.za': case 'thegolf.co.za': case 'thepub.co.za': case 'therugby.co.za': case 'websurfer.co.za': case 'workmail.co.za': return true; } return false; }