fixed email issues with the environments

This fix all tests in master branch