smallgroups replacement code for email