- Issue created by @hanoii
I am using reroute_email on dev environments to avoid sending the email. When it's configured to abort sending (not actually reroute it to another email), $message['send'] is set to FALSE.
https://git.drupalcode.org/project/drupal/-/blob/bfe3f5dc98cfefcca47362f... (also on 10.x).
Then _user_mail_notify assumes this is an error, which is not really as the comment above in the mailmanager says. result FALSE is error.
https://git.drupalcode.org/project/drupal/-/blob/bfe3f5dc98cfefcca47362f...
This triggers an error for example on
https://git.drupalcode.org/project/drupal/-/blob/bfe3f5dc98cfefcca47362f...
Where it shouldn't. There are other places where an empty return of _user_mail_notify() is assumed as an error without any distinction between NULL or FALSE.