benecaster_email_forwarded
Fires after benecaster_forward_email_to_admin() has queued a review copy of a logged email for an administrator.
benecaster_test_email_queued fires just before it for the same copy, which is why Benecaster’s email log records the copy as test. Neither benecaster_after_email_send nor benecaster_email_resent fires. The original email’s log and queue rows are left as they were.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$log_id |
int |
— | The email log row that was copied |
$admin_id |
int |
— | The administrator the copy was sent to |
$new_queue_id |
int |
— | The email queue row holding the copy |
Examples
Record who reviewed which email
add_action( 'benecaster_email_forwarded', function ( int $log_id, int $admin_id, int $new_queue_id ): void {
my_addon_note( sprintf( 'Review copy of log %d sent to user %d', $log_id, $admin_id ) );
}, 10, 3 );
Notes
Need this built rather than just documented? See our services →