WordPress.org

Make WordPress Core

Ticket #18926: pluggable.php.3.diff

File pluggable.php.3.diff, 547 bytes (added by soulseekah, 2 years ago)

action hook, WP_Error contains additional data

  • wp-includes/pluggable.php

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