Refactor email reminder