Modified checkMail method