better mail config with environment variables