Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jason Hendriks

    (@jasonhendriks)

    No Postman does not add, change or remove content, so it would be inappropriate to modify the content type. That’s the responsibility of the email creator.

    Having said that, you can add a little script to your theme’s functions.php file to alter email content type on all emails.

    function set_content_type( $content_type ){
            if(empty($content_type))
                    return 'text/html';
    }
    add_filter( 'wp_mail_content_type', 'set_content_type' );

    You just need to figure out how to identify the emails created by Email Post Type in the code above… I have assumed that if the content_type is not set, we should set it to HTML. See https://www.ads-software.com/support/topic/force-contact-form-7-send-plain-text-emails?replies=8

    Thread Starter Paul

    (@paulburd)

    Thanks for the great info, Jason! This solution may actually work as-is, without identifying the specific emails from Email Post Changes. The only other emails that we care about are form Gravity Forms, and those emails are already set to text/html. We don’t rely on the default WordPress notifications for anything so if those get marked incorrectly it may not be a big deal. Ultimately I hope that Email Post Changes gets updated to correctly set their content type.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Force html email?’ is closed to new replies.