• Maverickk

    (@maverickk)


    I “enabled HTML emails,” and did an email using simple HTML tables and everything seemed to work fine for a few weeks. All of a sudden I tested it the other day and the notification email when sent to the specified email address outputs raw HTML. What happened? I did a few updates to some other plugins, but would that effect this? Anyone else having this problem lately?

    https://www.ads-software.com/plugins/subscribe-to-comments-reloaded/

Viewing 11 replies - 1 through 11 (of 11 total)
  • yes. I’m updating an old blog & testing plugins & functionality.

    Yesterday this plugin sent an email styled with html. Ok, great. Then it sent emails showing the html tags visibly in the email. In the same day! lol.

    So I’m trying to figure this out as well.

    A screenshot or copy/paste of the actual email that you’re seeing would be helpful. A copy of the email source (View -> Raw Email Source in your email client) would also be helpful. Please use https://pastebin.com/ for sharing the raw source. Feel free to X-out any email addresses if you don’t want to share those.

    When I look at the source for the email, most of the html tags look fine, but the message itself – which I inputed into the plugin settings page – comes out with tags looking like this:

    & l t ; e m & g t ; (not sure how to make this showup here, lol, okay try: https://pastebin.com/embed_js.php?i=VdEtLnDe )

    instead of

    <em>

    So when I view the email normally, I see some of the tags as html rather than have them rendered as markup.

    As far as settings, I have “enable html in emails” turned on and “HTMLify links in emails” turned off.

    Strange if only two users are encountering this problem…?

    I’m using v. 140220.

    Here’s a larger sample from my raw email source: https://pastebin.com/raw.php?i=PLCaEtzJ

    I just got the problem to stop happening, as a temporary stop-gap, by adding this to my functions file:

    /* temp fix for subscribe-to-comments-reloaded problem */
    function my_fix_comment_reply_notifications($message) {
        return html_entity_decode($message, ENT_COMPAT, 'UTF-8' );
    }
    add_filter( 'stcr_notify_user_message', 'my_fix_comment_reply_notifications');

    I don’t know why this is necessary from looking at the plugin code but the fact that it helps might provide useful troubleshooting data for someone.

    I noticed the email that sends the link to manage subscriptions was also showing raw html for me. And with no handy filter hook to use, I fixed the problem temporarily by modifying line 19 of request-management-link.php as follows:

    $message = html_entity_decode(html_entity_decode( stripslashes( get_option( 'subscribe_reloaded_management_content', '' ) ), ENT_COMPAT, 'UTF-8' ), ENT_COMPAT, 'UTF-8');

    So perhaps the reverse function is being called multiple times somewhere? Not sure how that works.

    P.S. Thanks for creating this awesome plugin!!!

    I am having the same problem with version 140220, it escapes my HTML code and the email shows the HTML source.

    BOTStudent’s code above worked perfectly fine, thanks dude!

    Thread Starter Maverickk

    (@maverickk)

    Haven’t had a lot of time to devote to my wordpress website lately, hence my silence since I posted this issue. Although, thank you very much BOTStudent for coming up with a solution to this issue!

    Hello Guys, this sound like a decoding issue. Sometimes is hard to keep track of the issues so I will open a new ticket on the GitHub site of the plugin where we keep the development updated. I am trying to find a time to fix some of this issues.

    https://github.com/stcr/subscribe-to-comments-reloaded/issues/new?title=Bug%20Report:%20%3Cshort%20description%3E&labels=bug

    @botstudent If you have tested this fixture you can fork the plugin and then make a pull request.

    Regards.!!

    Joshua

    (@joshuavalentin)

    I’m also having problems with sending raw HTML emails. Hope that this gets fixed ??

    Guys this support will be move to the GitHub support site.

    https://github.com/stcr/subscribe-to-comments-reloaded/issues/44

    Regards.!!

    Guys this support will be move to the GitHub support site.

    https://github.com/stcr/subscribe-to-comments-reloaded/issues/44

    Regards.!!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Notification Message sending raw HTML’ is closed to new replies.