| 1 | <?php |
||
| 9 | class MailMxValidation |
||
| 10 | { |
||
| 11 | public function isEmailHostValid(string $emailAddress): bool |
||
| 17 | |||
| 18 | public function isEmailFormatValid(string $emailAddress): bool |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Check DNS Records for MX type. |
||
| 30 | */ |
||
| 31 | private static function isMxValid(string $host): bool |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Check if one of MX, A or AAAA DNS RR exists. |
||
| 38 | */ |
||
| 39 | private function isHostValid(string $host): bool |
||
| 43 | } |
||
| 44 |