I am working on one of my projects where users don't need to register or login to post an advert, but they have to provide an email address so that a confirmation link can be sent to the provided address for further actions.
I was reading how poor email validation is useless and that invalid emails still can pass through most of the checking functionality. But what can go wrong if the user's email is not valid? If user's email address is //bob"the+powerfull/@mail.com and this returns as valid email through the validator, what's going to happen?
Why is a simple validation not enough? If I don't store the emails in a DB and I am just sending an email confirmation? Can't I just use preg_match
or filter_var
? If the user uses an email like I already mentioned, do you even want users like that to visit your page at all?