Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
gorm
· 3y ago · 0 comments
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.
Comments
[–]
hn_throwaway_99
3y ago
FWIW the linked library does that,
https://github.com/dominicsayers/isemail/blob/master/is_emai...
[–]
gorm
OP
3y ago
It 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.