• Resolved dlali

    (@dlali)


    Dear Team,

    Back when i set up the plugin (in September), the first couple of test emails, and live emails went out properly.

    Recently however, the emails go out as raw html code.

    I am using Post SMTP plugin, and i can see that Cart Abandonement hands the emails over to Post SMTP as plain/text. (Content-Type: text/plain; charset=UTF-8) I am guessing this is what causes my HTML emailt to appear as pain text codes?

    Do you think this might be might problem? Any way to make sure Cart Abandonement emailt go out as HTML?

    THanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support CartFlows Team

    (@cartflows)

    Hello @dlali,

    Thank you for reaching out to us.

    If you are using the SMTP plugin to send emails, then please check if there is an option to send the email in plain text?

    Please make sure that you allow HTML through email and disable the sending plain text option from SMTP plugin settings.

    Let us know how it goes.

    Thread Starter dlali

    (@dlali)

    Hi,
    There was no option in the other pugin, i also wrote a query to them, waiting for answer.

    Anyway, meanwhile i have solved this problem with a filter. If anyone interested (got it from Google search):

    // adding support for html emails
    add_filter( 'wp_mail_content_type','mycustom_set_content_type' );
     
    function mycustom_set_content_type() {
            return "text/html";
    }
     
    // also filter the password reset email for compatibility with the HTML format
    add_filter( 'retrieve_password_message', 'mycustom_retrieve_password_message', 10, 1 );
     
    function mycustom_retrieve_password_message( $message ) {
            $message = str_replace('<','',$message);
            $message = str_replace('>','',$message);
            $message = str_replace("\n",'<br>',$message);
            return $message;
    }

    Tha password reset email filter may not be necessary, as in the woocommerce email settings it already supports html email for password reset.

    Ticket can be closed. Though it would be nice to have a solution without a manual filter.

    Plugin Support CartFlows Team

    (@cartflows)

    Hello @dlali,

    We are glad that your issue has been resolved.

    If you have any questions, please feel free to open a new ticket.

    Have a great day ahead.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Emails arrive as raw html code’ is closed to new replies.