/* Send Site Notifications to a BCC Address * * Original doc: https://wpmailsmtp.com/docs/sending-site-notifications-to-a-bcc-address/ */ function wpms_add_bcc_email_address( $args ) { $bcc_address = 'bcc: webmaster@fabrick.agency'; if ( ! empty( $args[ 'headers' ] ) ) { if ( ! is_array( $args[ 'headers' ] ) ) { $args[ 'headers' ] = array_filter( explode( "\n", str_replace( "\r\n", "\n", $args[ 'headers' ] ) ) ); } } else { $args[ 'headers' ] = []; } $args[ 'headers' ][] = $bcc_address; return $args; } add_filter( 'wp_mail', 'wpms_add_bcc_email_address', PHP_INT_MAX );

NEWS