Fix bug related to email environment variables

Use separate email configs for production and environment.