bp_send_email_failure

Fires after BuddyPress has tried - and failed - to send an email.

Description

do_action( 'bp_send_email_failure', (WP_Error) $status, (BP_Email) $email ); 

Parameters (2)

0. $status (WP_Error)
A WP_Error object describing why the email failed to send. The contents will vary based on the email delivery class you are using.
1. $email (BP_Email)
The email we tried to send.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_send_email_failure', $status, $email ); 
The following example is for adding a hook callback.
  1. // define the bp_send_email_failure callback 
  2. function action_bp_send_email_failure( $status, $email ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'bp_send_email_failure', 'action_bp_send_email_failure', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bp_send_email_failure', 'action_bp_send_email_failure', 10, 2 ); 

Defined (1)

The action is defined in the following location(s).

/bp-core/bp-core-functions.php  
  1. do_action( 'bp_send_email_failure', $status, $email );