new users do not get an email

Nextcloud version: 29.0.3
Operating system and version: Ubuntu 24.04
Apache: 2.4.58-1ubuntu8.4
PHP version: 2:93ubuntu2
The issue I am facing:

New users do not get an email.
Although test mail works fine.

This is the first time I have installed nextcloud. On my site the error is repeatable.

Steps to replicate it:

  1. Introduce a new user with a working email.
  2. Look at the email client of the user.
  3. An email from nextcloud is missing.

The output of your Nextcloud log in Admin > Logging:

Info	no app in context	
RouteNotFoundException Unable to generate a URL for the named route "heartbeat" as such route does not exist.
"Aug 9, 2024, 2:48:03 PM"	
Info	no app in context	
RouteNotFoundException Unable to generate a URL for the named route "heartbeat" as such route does not exist.
"Aug 9, 2024, 2:17:50 PM"	
Info	no app in context	
RouteNotFoundException Unable to generate a URL for the named route "heartbeat" as such route does not exist.
"Aug 9, 2024, 2:17:50 PM"	
Info	ocs_api	
Added userid admin to group group1
"Aug 9, 2024, 2:11:11 PM"	
Info	ocs_api	
Successful addUser call with userid: User1
"Aug 9, 2024, 2:11:10 PM"	
Info	ocs_api	
Successful addUser call with userid: User1
"Aug 9, 2024, 2:11:10 PM"

The output of your config.php file in /var/www/html/nextcloud/config:

<?php
$CONFIG = array (
  'instanceid' => 'oc1s999theid',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'my.nextcloud.com',
    1 => 'local.url',
  ),
  'datadirectory' => '/var/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '29.0.3.4',
  'overwrite.cli.url' => 'https://my.nextcloud.com/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'nnseee+1',
  'installed' => true,
  'mail_domain' => 'local.url.de',
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'sslout.de',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'admin@local.url.de',
  'mail_smtppassword' => 'xxxxxxxxxx',
  'mail_smtpsecure' => 'ssl',
  'loglevel' => 1,
  'maintenance' => false,
);

The output of the Apache system log in /var/log/apache2/other_vhosts_access.log can be found here: yourdomain.com:443 194.124.97.3 - mnn [09/Aug/2024:00:08:09 +0200] "PROPFIND /ne - Pastebin.com

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/email_configuration.html#enabling-debug-mode

Please also post the mailserver’s log