A water-works corporation is a corporation organized to supply water by mains or pipes to any of the cities, towns or villages in this state, and the inhabitants thereof.