https://github.com/nextcloud/mail/issues/296
Adding…
‘app.mail.imaplog.enabled’ => true,
‘app.mail.smtplog.enabled’ => true,
‘app.mail.imap.timeout’ => 20,
‘app.mail.smtp.timeout’ => 2,
‘app.mail.transport’ => ‘php-mail’,
to the config.php file fixed the problem.