Skip to content
Snippets Groups Projects
Commit c4dc6afc authored by ale's avatar ale
Browse files

Enable logging of SMTP errors

parent 50039745
Branches
Tags v0.4.1
No related merge requests found
Pipeline #31836 passed
......@@ -34,3 +34,11 @@ if (defined('SMTP_HOST')) {
}
}
/**
* Handler to log email failures.
*/
function log_mail_failure($wp_error) {
error_log('SMTP error: ' . print_r($wp_error, true));
}
add_action('wp_mail_failed', 'log_mail_failure', 10, 1);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment