Nextcloud Notifications not sending mail on file creation

Nextcloud version (eg, 29.0.5): 30.0.0
Operating system and version (eg, Ubuntu 24.04): ‘Debian 12’
Apache or nginx version (eg, Apache 2.4.25): ‘Apache 2.4.62’
PHP version (eg, 8.3): ‘8.2’

The issue you are facing:
Since update to 30.0.0 Mail notifications about created files in shared folder are not sent. Notifications about new shared folders and the test mail are sent correctly.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Create a folder and share it to another user or group
  2. Another user uploads some file
  3. Mail is not sent

The output of your Nextcloud log in Admin > Logging:

follows later, Logging Site freezes if all loglevels activated, there are only "info" and "fehlerbehebung" ones, no critical errors

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '****',
  'passwordsalt' => '****',
  'secret' => '****',
  'trusted_domains' =>
  array (
    0 => '192.168.1.15',
    1 => 'domain1.de',
    2 => '127.0.40.15',
    3 => 'public ip',
    4 => 'cloud.domain2.de',
  ),
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'datadirectory' => '/media/data/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '30.0.0.14',
  'overwrite.cli.url' => 'https://cloud.domain2.de',
  'dbname' => 'db_nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '****',
  'installed' => true,
  'theme' => '',
  'loglevel' => 0,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauthtype' => 'NTLM',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'domain2.de',
  'default_language' => 'de_DE',
  'default_locale' => 'de_DE',
  'mail_smtphost' => '192.168.185.206',
  'updater.release.channel' => 'stable',
  'default_phone_region' => 'DE',
  'overwritehost' => 'cloud.domain2.de',
  'skeletondirectory' => '',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'user\\ad',
  'mail_smtppassword' => '****',
  'mail_smtpstreamoptions' =>
  array (
    'ssl' =>
    array (
      'allow_self_signed' => true,
      'verify_peer' => false,
      'verify_peer_name' => false,
    ),
  ),
  'trusted_proxies' =>
  array (
    0 => '127.0.0.1',
    1 => '::1',
    2 => '192.168.1.1',
    3 => '192.168.1.15',
  ),
  'maintenance_window_start' =>
  array (
    'maintenance_window_start' => 1,
  ),
  'app_install_overwrite' =>
  array (
    0 => 'tasks',
  ),
  'has_rebuilt_cache' => true,
);

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

follows later
Is there a simple way to remove user and IP information from the log?

This could be a related problem to this one: Nextcloud.log is running full, and fileshare mails wont be sended

No mail notification is sent when a file/folder is shared by mail (not with another internal user).

Unfortunately I do not seem to find a relevant fix in the 30.0.1 RC1 release notes.