• Resolved philosofree

    (@philosofree)


    Hi,
    I have been trying to create a post registration email notification that presents content using HTML tags, as suggested on the prompt.

    I can insert the HTML OK, but it comes out in gmail as plain text, showing all the markups, not interpreting them.

    If you want to understand the problem by seeing the output, register on dev.linkedinspirit.net, then authenticate your email to receive the email.

    Please advise how I can overcome this problem, thanks. Phil

    The html i have tested is simple enough:
    <h1>Step 1 </h1>
    <p> To login in this site use the following: </p>

    • URL to login: https://www.linkedinspirit.net/login/
    • Username= **username**
    • Password = **password** (Please keep this password in a safe place, such
      as a encrypted safe like the freeware Keepass.
      There is an option to change your password once you are logged in to your
      profile page)
    • I also tried other options, including html and body tags. still not working

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter philosofree

    (@philosofree)

    Can anyone help with this, as text only email is pretty unhelpful.
    Also it would be really good to apply the generic substitutions such as **username** that are used for example in the https://www.ads-software.com/plugins/import-users-from-csv-with-meta/

    thanks
    Phil

    Hello,

    I have the same problem with the e-mail function “Enable email notification for new registered users?” when my users sign up they have no jump lines, and when i use the <br /> tag to skip a line, the tag does not show up in the mail but no line breaks …

    Here is an example of the mails sent:

    https://image.noelshack.com/fichiers/2018/09/4/1519934653-capture.png

    In addition, it is not possible to modify the subject of the email sent to the user …
    It’s a shame, and I can not find any plugin that can modify the welcome e-mail.

    Thank you for your help if someone to a solution.

    Yes please at least give us a way to make a new line.

    Ideally the plugin owner would fix this, but in the meantime you can solve it by modifying line 574 at clean-login.php

    Add the following in a new line:
    $headers[] = "Content-Type: text/html; charset=UTF-8";

    And then replace the line:
    if( !wp_mail( $email, $subject , $message ) )

    with:
    if( !wp_mail( $email, $subject , $message, $headers ) )

    That should do the trick, just remember that the patch is just temporary, it will get erased with a new plugin update

    @adrianifero i has follow you for modifyng, but not have change, can i see your clean-login.php?

    Plugin Author Alberto Hornero

    (@hornero)

    @adrianifero thanks for the suggestion, I’ve updated the code accordingly.

    And sorry for the delay in my answer. Best regards,

    Alberto.

    Hi,

    I have the latest version 1.9.4 and still doesn’t work for me.

    If I write
    <p>This is a test <a href="https://www.google.com">link</a> !</p>

    I receive in the mailbox the same thing
    <p>This is a test <a href="https://www.google.com">link</a> !</p>

    Please look :
    https://image.noelshack.com/fichiers/2018/34/2/1534809476-pbmaillogin.jpg

    Thanks for your help.

    • This reply was modified 6 years, 3 months ago by billmood.
    • This reply was modified 6 years, 3 months ago by billmood.
    • This reply was modified 6 years, 3 months ago by billmood.

    Hi @hornero
    Looks like email body content is in database ( wp_options, key ‘cl_emailnotificationcontent’ ), but html tags are escaped.

    So, the solution (to send html/text formatted emails) will be:
    clean-login.php (line 513), just after:
    $emailnotificationcontent = str_replace(“{email}”, $email, $emailnotificationcontent);
    add this line:

    // fix
    $emailnotificationcontent = html_entity_decode($emailnotificationcontent, ENT_COMPAT, 'UTF-8');
    • This reply was modified 5 years, 11 months ago by mickcss.
    • This reply was modified 5 years, 11 months ago by mickcss.
    Plugin Author Alberto Hornero

    (@hornero)

    Thanks for your contribution. Could the rest of people in this thread confirm that this solution works for them? I had tested and for me, it works as before (for me worked fine before as well). Just to have a double check from the community.

    Thank you all!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Email notification doesn’t support HTML as claimed’ is closed to new replies.