How to pull all valid email address from console in my server?


#1

How to pull all valid email address (drop the banned email account) from console in my server?

an account in one line

thanks


(Alan Tan) #2

User.where(active: true).pluck(:email) should get you what you need :slight_smile:


#3

Where is this command used? After enter app?


(cpradio) #4

You would ssh into your server, run ./launcher enter app inside /var/discourse, and then run rails c, from there you can run the command @tgxworld posted


#5

no shell script from origin server´╝čnot in container solution´╝îbecause i want to run cron job.