The max length of the email is 254, improved the code, delete unnecessary code