Seeing mail stored by mail collector in Drupal 9 not just word array

drush sget system.test_mail_collector just gave Array. Yeah, the word array.

The secret is var_dump

So:

drush sget system.test_mail_collector --format=var_dump

Updated https://www.drupal.org/docs/develop/local-server-setup/managing-mail-handling-for-development-or-testing#s-mail-to-state-system-drupal-8 to include this format part— without providing a forgiving format, you can get just ‘array’ or an error from this state get command.

In our case, on DDEV, we would much rather these e-mails end up in mailhog, so on this old site which was using Swiftmail we changed the config in settings.local.php to have these overrides:

$config['swiftmailer.transport']['transport'] = 'smtp';
$config['swiftmailer.transport']['smtp_host'] = 'localhost';
$config['swiftmailer.transport']['smtp_port'] = '1025';