updates to use environment variables for mail configuration