WordPress.org

Make WordPress Core

Ticket #18926: pluggable.php.5.diff

File pluggable.php.5.diff, 498 bytes (added by soulseekah, 3 years ago)

wp_mail_failed action hook

  • wp-includes/pluggable.php

     
    433433        try { 
    434434                $phpmailer->Send(); 
    435435        } catch ( phpmailerException $e ) { 
     436                 
     437                $mail_error_data = compact( $to, $subject, $message, $headers, $attachments ); 
     438                do_action( 'wp_mail_failed', new WP_Error( $e->getCode(), $e->getMessage(), $mail_error_data ) ); 
     439                 
    436440                return false; 
    437441        } 
    438442