Send a specific email in HTML and the rest in plain text

Try adding quotes around the return value:

add_filter( 'wp_mail_content_type', function() { return 'text/html'; });