Made groups collection, post mail from function