Commit c4dc6afc authored by ale's avatar ale
Browse files

Enable logging of SMTP errors

parent 50039745
Pipeline #31836 passed with stage
in 7 seconds
......@@ -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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment