1. An electronic device with an email function, wherein the electronic device accesses and receives emails from a predetermined email account, the electronic device comprising: a storage unit capable of storing emails; and a processing unit executed by a processor comprising: an email receiving module capable of receiving emails sent from an original email account via the predetermined email account; a reading module capable of reading the received emails; a detection module capable of detecting whether parameters of a read email are consistent with predetermined rules; and an account setting module capable of changing the predetermined email account to the original email account when the parameters of the read email satisfy the predetermined rules; wherein the parameters of the email comprise an email subject and an email content, the detection module is capable of detecting whether the email subject or email content of the read email comprises a verification code, a user name of the original email account of the read email, and a password of the original email account, to determine whether the parameters of the read email are consistent with the predetermined rules; and the account setting module is further capable of setting the predetermined email account of the electronic device as an unavailable email account.