html email templates not working with pro sites emails any more

Good evening everybody!

It seems like html email templates is not working for pro sites e-mails any more. whether i turn "Modify HTML Emails" on or off.

Best,
David

  • Tyler Postle
    • CGO

    Hey David,

    Sorry about this, looks like it got pushed to the side in favor of other projects. I'm flagging one of our SLS staff(coding experts) to have a look at re-integrating them.

    One of us will post back here with an update once it's done.

    Any further questions in the meantime just let us know :slight_smile:

    Cheers,
    Tyler

  • Ash
    • WordPress Hacker

    Hello guys,

    Would you please try the following code if it works?

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

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Nithin
    • Support Wizard

    Hi David,

    Hope you are doing good today. :slight_smile:

    It seems like Ash is not online at the moment. I have pinged Ash, and have asked to give a closer look at this. Will keep you updated, once I get an update regarding this. Either myself, or the developer will keep you posted asap.

    Kind Regards,
    Nithin

  • Ash
    • WordPress Hacker

    Hello David

    Actually it's working for me even without my fix. But it's weird that it works for one email, but not for others pro site email.

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

    Let's try the code above and let us know what happens.

    Have a good day!

    Cheers
    Ash

  • Tyler Postle
    • CGO

    Hey Sean,

    I just tested the above code that Ash provided to see if it worked and that's not working for me right now either. Ash is currently away on Vacation but I've messaged one of our other developers to see if they can have a look into this and at least provide a solution in the interim :slight_smile:

    Either myself or the developer will reply back after they have investigated further. Keep in mind they deal with more complex issues so a reply can often take longer than usual.

    If you have any questions in the meantime then please do create a new ticket for them: https://premium.wpmudev.org/forums/#question

    Talk to you soon!

    Cheers,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.