Why doesn't a user receive an email when I share a file with them, but when I share the same file with an external email (e.g., Gmail), the recipient gets the email in Nextcloud 30.0.5?

When sharing a file with a Nextcloud user, the recipient does not receive an email notification. However, when sharing the same file with an external email address (e.g., Gmail), the recipient does receive the email.

Steps to replicate it (hint: details matter!):

  1. Share a file with an internal Nextcloud user.
  2. Observe that no email notification is received.
  3. Share the same file with an external email address (e.g., Gmail).
  4. Observe that the external recipient receives an email notification.