Fixing the issue that emain subject not taken from environment variable