#8 changed check for existing mails
added index to the timestamp of mailtransactions