Improved email address validity check to conform to RFC 5321, thanks to gitbensons.