Symphony Mailer error | mail test and verification fails

mail test and verification fails with following error

[index] Error: Exception: Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream::setTimeout(): Argument #1 ($timeout) must be of type float, string given, called in /var/www/nextcloud/lib/private/Mail/Mailer.php on line 305 in file ‘/var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/Stream/SocketStream.php’ line 37 at <>

  1. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
  2. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
  3. /var/www/nextcloud/lib/base.php line 1055
    OC\Route\Router->match()
  4. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

Caused by:

TypeError: Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream::setTimeout(): Argument #1 ($timeout) must be of type float, string given, called in /var/www/nextcloud/lib/private/Mail/Mailer.php on line 305 at <>

  1. /var/www/nextcloud/lib/private/Mail/Mailer.php line 305
    Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream->setTimeout()
  2. /var/www/nextcloud/lib/private/Mail/Mailer.php line 276
    OC\Mail\Mailer->getSmtpInstance()
  3. /var/www/nextcloud/lib/private/Mail/Mailer.php line 189
    OC\Mail\Mailer->getInstance()
  4. /var/www/nextcloud/apps/settings/lib/Controller/MailSettingsController.php line 168
    OC\Mail\Mailer->send()
  5. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Settings\Controller\MailSettingsController->sendTestMail()
  6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
  7. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
  8. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
  9. /var/www/nextcloud/lib/base.php line 1055
    OC\Route\Router->match()
  10. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

nextcloud version 26.0.1
mail_smtpmode’ => ‘smtp’,
‘mail_sendmailmode’ => ‘smtp’,
‘mail_from_address’ => ‘’,
‘mail_domain’ => ',
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_smtpauth’ => 1,
‘mail_smtphost’ => ‘’,
‘mail_smtpport’ => ‘587’,
‘mail_smtptimeout’ => ‘30’,
‘mail_smtpname’ => ‘’
‘mail_smtppassword’ => ‘’
‘maintenance’ => false,
‘theme’ => ‘’,
‘loglevel’ => 2,
‘app_install_overwrite’ =>
array (
0 => ‘quicknotes’,
1 => ‘richdocumentscode’,
),
‘mail_smtpsecure’ => ‘ssl’,

How should this work if you have not configured any SMTP server to deliver email to?
Please checkout the Nextcloud Admin guide for details how to setup email.