• wdunkley

    (@wdunkley)


    So I had this issue whereas when using wpMandrill to send emails from WordPress the reset password link would not appear in the Reset Password email. After digging around this was an issue only with Gmail and to do with the link being incased in < >.

    This caused Gmail to hide this link.

    After searching around I found a few of solutions.
    1.Changing core WordPress files, NOT RECOMMENDED, so I will skip this absurd idea.

    2. Set the “Replace all line feeds by in the message body?” to YES. Although this issue does work it will mess up your emails if using HTML Emails in your WordPress Theme/Site.

    3. The 3rd was from an actual Mandrill Developer which was either wrong or outdated. It is this FIX I have corrected (as of WP 4.1 anyway). Just add the below code to your functions.php file. This will set your “Replace all line feeds by in the message body?” to YES, but only for the Reset Password Email and prevent it causing issues with other emails being sent from WordPress.

    // Fix Mandrill Issue whereas Mandrill Removes reset email link for forgootten password emails
    function forgotMyPasswordEmails($nl2br, $message) {
        if ( in_array( 'wp_retrieve_password', $message['tags']['automatic'] ) ) {
            $nl2br = true;
        }
        return $nl2br;
    }
    add_filter( 'mandrill_nl2br', 'forgotMyPasswordEmails', 10, 2 );
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[FIX] wpMandrill not showing reset password link in email’ is closed to new replies.