Updated email script