I am curious to know how October CMS knows whether to use the mail config from the back-end (database) or to use the config that’s in your .env file. Does one take priority over the other?
October CMS will use mail configuration from the database first, then use the file-based configuration (.env / config file) as a fallback option. If the database configuration is reset via Settings → Mail Configuration, it will always use the file-based configuration. The database configuration will only apply once that form is saved for the first time.