How-to and Troubleshooting
        
    
    
                    
                        
                        4                    
            Posts
        
        
                    
                        
                        2                    
            Users
        
        
                    
                        
                        0                    
            Reactions
        
        
                    
                        
                        3,084                    
            Views
        
        Aug 19, 2018 9:30 am
                        Hello..
I am using WP Better Emails to add html templates to my emails and got a problem with your plugins emails as they are set to text/html using the filter add_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
WB better emails require content type text/plain before it wrap the html template to the email.
I can not use the same filter as i then get conflict with other plugins i am using unless you have / know any condition i can set in my filter function to check that the email actually is from wpForo or other of your addons.
Something like this:
add_filter( 'wp_mail_content_type', 'aws_wpforo_set_html_content_type', 11 );
function aws_wpforo_set_html_content_type() {
       if ( wpForo ) {
	return 'text/plain';
       } 
} 
Thanks
Rune
                         3 Replies                    
                Aug 19, 2018 12:39 pm
                        Ok, it's done. You can use this hook in next version.
Aug 19, 2018 12:56 pm
                        Thanks a lot 🙂
Rune


 
                         
                        
