• Resolved dkneidhart

    (@dkneidhart)


    Is there a way to add a filter where it will ignore certain emails with the subject / email address or to only show mails with an error?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Dake

    (@dakeg)

    Hi @dkneidhart

    Thanks for reaching out, I have asked our developers about your filter question and will get back to you once I have an update.

    Plugin Support Dake

    (@dakeg)

    Hi @dkneidhart

    Thank you for your patience.

    We do have a filter,?wp_mail_logging_before_log_email?which the you can use to not log specific emails.

    Example usage:

    add_filter( 'wp_mail_logging_before_log_email', 'wp_mail_logging_filter' );
    
    function wp_mail_logging_filter( $mail ) {
    
    	if ( $mail['to'] === '[email protected]' ) {
    		return false;
    	}
    
    	return $mail;
    }

    This will prevent emails to?[email protected]?from being logged.

    $mail arg is an array which contains the following.

    $mail['to']
    $mail['subject']
    $mail['headers']
    $mail['attachments']
    Thread Starter dkneidhart

    (@dkneidhart)

    Thank you so much that worked perfectly.

    Plugin Support Dake

    (@dakeg)

    Hi @dkneidhart

    You’re welcome, glad we could help ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add filter to ignore certain emails’ is closed to new replies.