I'd suggest clarifying "ALL" to mean "ALL use of wp_mail()" in case other plugins have implemented their own mail class or SMTP integration. For instance, in the case of Comment Mail (and a few other SMTP plugins) there is a separate instance of \PHPMailer that resides outside of wp_mail(). You might not pick those up if the plugin doesn't call phpmailer_init.
Also, the wp_mail() function itself is a "pluggable" function. Therefore, it is possible for custom implementations of wp_mail() to exist which are either customized by a hosting company or altered by another plugin. So you might even want to mention that your logging is attached to phpmailer_init in the wp_mail() function so that all use of wp_mail() is logged for analysis.
That's enough information for others to see the potential for certain things not to be logged under abnormal conditions; or with plugins that implement their own SMTP integration that resides outside of wp_mail().
I'd suggest clarifying "ALL" to mean "ALL use of
wp_mail()
" in case other plugins have implemented their own mail class or SMTP integration. For instance, in the case of Comment Mail (and a few other SMTP plugins) there is a separate instance of\PHPMailer
that resides outside ofwp_mail()
. You might not pick those up if the plugin doesn't callphpmailer_init
.Also, the
wp_mail()
function itself is a "pluggable" function. Therefore, it is possible for custom implementations ofwp_mail()
to exist which are either customized by a hosting company or altered by another plugin. So you might even want to mention that your logging is attached tophpmailer_init
in thewp_mail()
function so that all use ofwp_mail()
is logged for analysis.That's enough information for others to see the potential for certain things not to be logged under abnormal conditions; or with plugins that implement their own SMTP integration that resides outside of
wp_mail()
.