All those environment variables are just a way to set the admin server settings during startup (without touching the user interface, so that it can be integrated with your deployment configuration).
They're parsed and saved in the database in the "server_settings" table.
You can set values in that postgres table manually as well.
In particular, that setting is "SMTP server (for email)", under "Email Configuration", when the backend type is "smtp".
Below is a screenshot for reference. It's all set by those environment variables, hence it is read-only and disabled. If you do not set those environment variables, you can enter all those values right there manually.
In any case, after any changes there, and they're saved and stored in that table in the database, you have to restart cocalc's services to make those changes effective.
-- Harald