php - Is it a good practise to validate email addresses using SMTP validation? -
let's imagine have site features require email validation (eg. user registration). of course validate emails using regex once upon time saw smtp validation in else's code. , bad sides has smtp validation?
i can assume following pros , cons:
pros:
- we can check out email addresses existence (not smtp servers allows feature).
cons:
- our site can blocked.
- maybe can use make webserver going down. webserver take domain part of email address , make request it. can create fake smtp server receive request make great delay response. maybe if force webserver make dozens of such checks not able answer other clients.
- not smtp servers provide capability.
please constructive.
"smtp validation" assume refers smtp vrfy
command, , in day , age fool trust in it. it's great feature if you're spammer because allows enumerate email addresses given server.
no 1 in right mind expose command internet , have respond other 252 send mail, i'll try best
, aka "i'm going validate email addresses during actual mail transaction".
the sane use of vrfy
these days internal interface between spam filtering appliance , mail server hiding behind it.
tl;dr don't use "smtp validation", horribly unreliable at best.
if want validate user has entered valid email address, send email activation link/code.
Comments
Post a Comment