If you know SQL, you can do this sort of custom reporting ("get the email addresses of all enrolled students who ...") using https://moodle.org/plugins/report_customsql (or the configurable reports block).
Teaching with Moodle
Moodle 3.2 - message students who haven't completed a course
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.