Like many people I've had failures sending email from Nextcloud which can be resolved by setting 'mail_smtptimeout' => '30' in my config.php
This feels annoyingly manual and will need redoing every time the container updates. I would prefer to configure this through an environment variable to the container. I suggest making this possible through SMTP_TIMEOUT.