Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Wilson

    (@mtoolstec)

    Seems to find the solution.

    function my_mail_filter($args)
    {
        if (isset($args['headers']) && ! is_array($args['headers'])) {
            //Check original header length
            if(strlen($args['headers']) == 0){
                $existing_headers = $args['headers'];
                unset($args['headers']);
                $args['headers'][] = $existing_headers;
                $args['headers'][] = 'Content-Type: text/html; charset=UTF-8';
            }
        }
        return $args;
    }
        
    add_filter('wp_mail', 'my_mail_filter');
    add_filter( 'bdpwr_code_email_text', 'reset_password_email', 10, 4 );
    
    function reset_password_email($text, $email, $code, $expiry){ xxxxxx }
    Plugin Author dominic_ks

    (@dominic_ks)

    Hey @mtoolstec,

    Glad you are finding the plugin useful and thanks for sharing the updated code snippet.

    Going to mark this as resolved as don’t think you need anything else from me here?

    Cheers,
    Dominic,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Raw HTML sent after using the filter’ is closed to new replies.