The environment and H? content of galaxies