3 ms·
Nearly correct. You should also do a DNS lookup on $2 and check if it has either a MX record or an A record before trying to send it.
by gorm 4y ago
Nearly correct. You should also do a DNS lookup on $2 and check if it has either a MX record or an A record before trying to send it.
- hn_throwaway_99 4y agoFWIW the linked library does that, https://github.com/dominicsayers/isemail/blob/master/is_email.php#L167 https://github.com/dominicsayers/isemail/blob/master/is_emai...
- gorm 4y agoIt looks like it only check for a MX, but email could might be delivered with just an A record and without a MX record I think.