loops through next steps and sends emails