For local development, so that I can test outgoing email safely, I use the Drupal settings.php file to store my MailHog email server settings e.g.
$conf['smtp_host'] = 'mail'; //Docker container $conf['smtp_port'] = '1025'; //MailHog port
This way I can refresh the local database and it will immediately work in my local environment.
I cannot see an obvious way of doing this for CiviCRM? Looking at the API explorer, I have experimented with a few things like:
But does this not seem to work. Can this be done? It would be nice to not have to change my SMTP setting each time.