Added update logic to the EmailMessageRepository.