Discourse not sending Emails to All Users in mailing list mode

Mailing list mode is set on the user_options table. Try running UserOption.where(mailing_list_mode: true). To get the user ids of all users with mailing list mode enabled, run UserOption.where(mailing_list_mode: true).pluck(:user_id)