Yes, of course it wont work; you've just thrown my code
sample into your function

. Because it is at the top of your function email_check() it will cause an immediate return (not executing any of the code that follows it) and the value of true or false that it returns will just be discarded, as you don't do anything with it.