changes for email generation for all departments on running the script