DataInconsistency
2 weeks ago
License
2 months ago
Notices
2 months ago
pQuery
2 months ago
APIPermissionHelper.php
1 year ago
CdnAssetUrl.php
3 years ago
ConflictResolver.php
1 month ago
Cookies.php
2 months ago
DBCollationChecker.php
2 months ago
DOM.php
2 years ago
DateConverter.php
3 years ago
FreeDomains.php
3 years ago
Headers.php
1 year ago
Helpers.php
1 month ago
Installation.php
1 year ago
LegacyDatabase.php
1 year ago
Request.php
2 months ago
SecondLevelDomainNames.php
3 years ago
Security.php
2 months ago
ThirdPartyOutput.php
1 month ago
Url.php
2 months ago
index.php
3 years ago
FreeDomains.php
68 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Util; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | class FreeDomains { |
| 9 | |
| 10 | /* https://github.com/mailcheck/mailcheck/wiki/List-of-Popular-Domains */ |
| 11 | const FREE_DOMAINS = [ |
| 12 | /* Default domains included */ |
| 13 | 'aol.com', 'att.net', 'comcast.net', 'facebook.com', 'gmail.com', 'gmx.com', 'googlemail.com', |
| 14 | 'google.com', 'hotmail.com', 'hotmail.co.uk', 'mac.com', 'me.com', 'mail.com', 'msn.com', |
| 15 | 'live.com', 'sbcglobal.net', 'verizon.net', 'yahoo.com', 'yahoo.co.uk', |
| 16 | |
| 17 | /* Other global domains */ |
| 18 | 'email.com', 'fastmail.fm', 'games.com' /* AOL */, 'gmx.net', 'hush.com', 'hushmail.com', 'icloud.com', |
| 19 | 'iname.com', 'inbox.com', 'lavabit.com', 'love.com' /* AOL */, 'outlook.com', 'pobox.com', 'protonmail.ch', 'protonmail.com', 'tutanota.de', 'tutanota.com', 'tutamail.com', 'tuta.io', |
| 20 | 'keemail.me', 'rocketmail.com' /* Yahoo */, 'safe-mail.net', 'wow.com' /* AOL */, 'ygm.com' /* AOL */, |
| 21 | 'ymail.com' /* Yahoo */, 'zoho.com', 'yandex.com', |
| 22 | |
| 23 | /* United States ISP domains */ |
| 24 | 'bellsouth.net', 'charter.net', 'cox.net', 'earthlink.net', 'juno.com', |
| 25 | |
| 26 | /* British ISP domains */ |
| 27 | 'btinternet.com', 'virginmedia.com', 'blueyonder.co.uk', 'live.co.uk', |
| 28 | 'ntlworld.com', 'orange.net', 'sky.com', 'talktalk.co.uk', 'tiscali.co.uk', |
| 29 | 'virgin.net', 'bt.com', |
| 30 | |
| 31 | /* Domains used in Asia */ |
| 32 | 'sina.com', 'sina.cn', 'qq.com', 'naver.com', 'hanmail.net', 'daum.net', 'nate.com', 'yahoo.co.jp', 'yahoo.co.kr', 'yahoo.co.id', 'yahoo.co.in', 'yahoo.com.sg', 'yahoo.com.ph', '163.com', 'yeah.net', '126.com', '21cn.com', 'aliyun.com', 'foxmail.com', |
| 33 | |
| 34 | /* French ISP domains */ |
| 35 | 'hotmail.fr', 'live.fr', 'laposte.net', 'yahoo.fr', 'wanadoo.fr', 'orange.fr', 'gmx.fr', 'sfr.fr', 'neuf.fr', 'free.fr', |
| 36 | |
| 37 | /* German ISP domains */ |
| 38 | 'gmx.de', 'hotmail.de', 'live.de', 'online.de', 't-online.de' /* T-Mobile */, 'web.de', 'yahoo.de', |
| 39 | |
| 40 | /* Italian ISP domains */ |
| 41 | 'libero.it', 'virgilio.it', 'hotmail.it', 'aol.it', 'tiscali.it', 'alice.it', 'live.it', 'yahoo.it', 'email.it', 'tin.it', 'poste.it', 'teletu.it', |
| 42 | |
| 43 | /* Russian ISP domains */ |
| 44 | 'bk.ru', 'inbox.ru', 'list.ru', 'mail.ru', 'rambler.ru', 'yandex.by', 'yandex.com', 'yandex.kz', 'yandex.ru', 'yandex.ua', 'ya.ru', |
| 45 | |
| 46 | /* Belgian ISP domains */ |
| 47 | 'hotmail.be', 'live.be', 'skynet.be', 'voo.be', 'tvcablenet.be', 'telenet.be', |
| 48 | |
| 49 | /* Argentinian ISP domains */ |
| 50 | 'hotmail.com.ar', 'live.com.ar', 'yahoo.com.ar', 'fibertel.com.ar', 'speedy.com.ar', 'arnet.com.ar', |
| 51 | |
| 52 | /* Domains used in Mexico */ |
| 53 | 'yahoo.com.mx', 'live.com.mx', 'hotmail.es', 'hotmail.com.mx', 'prodigy.net.mx', |
| 54 | |
| 55 | /* Domains used in Canada */ |
| 56 | 'yahoo.ca', 'hotmail.ca', 'bell.net', 'shaw.ca', 'sympatico.ca', 'rogers.com', |
| 57 | |
| 58 | /* Domains used in Brazil */ |
| 59 | 'yahoo.com.br', 'hotmail.com.br', 'outlook.com.br', 'uol.com.br', 'bol.com.br', 'terra.com.br', 'ig.com.br', 'r7.com', 'zipmail.com.br', 'globo.com', 'globomail.com', 'oi.com.br', |
| 60 | ]; |
| 61 | |
| 62 | public function isEmailOnFreeDomain($email) { |
| 63 | $emailParts = explode('@', $email); |
| 64 | $domain = end($emailParts); |
| 65 | return in_array($domain, self::FREE_DOMAINS); |
| 66 | } |
| 67 | } |
| 68 |