some modifications about storing mails