add script to generate required emails for end of phase 2