Anspress notification email text/html format

7.18K viewsCore
1

I receive notification emails from my site as simple text emails with html tags in it, that aren’t render as html. “Hello!,

A new answer is posted by Admin

The problem is not from my email client, because I receive Open-wp notifications without such a problem.

same problem here, I am using v1.4.x

0

Just replace “text/plain” to “text/html” in line 372, see here:

https://github.com/anspress/anspress-email/blob/master/anspress_email.php#L372

I made that change and it seems to have worked, but when I save my HTML code in the plugin page email tab, there are “\” that get added to the code which makes it not work. The “\” seem to be added by the plugin anywhere in the code where there is a quotation mark “.

Here is an example of the code:
div style=\\\\\\\”padding: 15px 0;\\\\\\\”

replace return strtr($content, $args); to return stripslashes(strtr($content, $args)); in line 378 https://github.com/anspress/anspress-email/blob/master/anspress_email.php#L378

I just made the change and it works for sending the email, but the “\” are still being added in the plugin page. I guess it’s not a big deal though.

You are viewing 1 out of 3 answers, click here to view all answers.