How to set all users notifying email preferences to none?

You want to deactivate all users. They can reactivate by resetting their password. You should be able to find an example rails command to do that searching here or looking at some import scripts.