Anspress notification email text/html format

7.27K 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

Is it possible to change the “from” name of the email sent to something other than “WordPress <[email protected]>”

You need to install SMTP plugin

Thank you sir!

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.

0

Hello

I would like to have the notification emails be in HTML format as well, but the plugin is not rendering the HTML tags. Can you explain the solution to get this working?

Thanks!

Check my answer