• Hi

    I use WP Better emails to add lovely header and footers to all my emails, and I use the following code from the author to send all HTML emails using the plugin:

    add_filter( 'wp_mail_content_type', 'wpbe_force_plain_text', 99 );
    function wpbe_force_plain_text( $content_type ) {
        return 'text/plain';
    }

    The issue is that it’s auto adding an extra break to all HTML emails! Plain text is working perfectly! How do I stop this extra line break that Mandrill seems to be adding?

    I’ve tried this:

    add_filter( 'wpbe_html_body', 'wpbe_remove_br');
    function wpbe_remove_br( $message ) {
        return str_replace(array('<br />', '<br>','<br/>'), '', $message);

    But then it removes all the spaces from the PLAIN text emails!

    Any help is appreciated!!

    https://www.ads-software.com/plugins/wpmandrill/

  • The topic ‘Adding Extra Line Breaks’ is closed to new replies.