I had the exact same problem some time ago.
Truth be told I have not figured it out exactly…
For all intents and purposes I found a list of functions that use wp_mail
, and worked it out from there:
wp-login.php: retrieve_password()
wp-admin/includes/class-wp-automatic-updater.php: WP_Automatic_Updater::send_email()
wp-admin/includes/class-wp-automatic-updater.php: WP_Automatic_Updater::send_debug_email()
wp-admin/includes/ms.php: update_option_new_admin_email()
wp-admin/includes/ms.php: send_confirmation_on_profile_email()
wp-admin/includes/upgrade.php: wp_new_blog_notification()
wp-includes/pluggable.php: wp_password_change_notification()
wp-includes/pluggable.php: wp_new_user_notification()
wp-includes/pluggable.php: wp_notify_postauthor()
wp-includes/pluggable.php: wp_notify_moderator()
wp-includes/user.php: wp_update_user()
wp-includes/ms-functions.php: wpmu_welcome_user_notification()
wp-includes/ms-functions.php: newblog_notify_siteadmin()
wp-includes/ms-functions.php: newuser_notify_siteadmin()
wp-includes/ms-functions.php: wpmu_welcome_notification()
wp-includes/ms-functions.php: wpmu_signup_blog_notification()
wp-includes/ms-functions.php: wpmu_signup_user_notification()
You can find it here: https://developer.wordpress.org/reference/functions/wp_mail/#used-by