generic method getEmailAccount