How to fix broken reset password links
-
So the global setting of text/html breaks the reset password link since the <> cause it to disappear. To fix this, you can change the New Post Notification plugin (which was the only one causing it on my site) to set the mail to HTML then set it back to PLAIN after the send command.
In this file
wp-content/plugins/new-post-notification/npn_plugin.php
do the following
1) Search for the HTML-Mails add_filter line and move it (copy, delete, then add)
a) delete from near top of plugin
b) Add it right above the foreach loop
// Use HTML-Mails
add_filter(‘wp_mail_content_type’,create_function(”, ‘return “text/html”; ‘));// Go through the users and check the access //
foreach ($users as $user){2) Add the default plain line below the // send Mail code
// send Mail if User activated Notification and there was no notification before.
if ($access==true AND $cat_chosen==true AND get_the_author_meta( ‘npn_mailnotify’, $user->ID )==’1′ AND get_post_meta( $post_ID, ‘npn_notified’, true) != ‘1’) wp_mail( $user->data->user_email, ‘[‘.get_option(‘blogname’).’] ‘.__(‘New Post’,’npn_plugin’).’: ‘.$postobject->post_title, npn_generate_mail_content($postobject,$postcontent,$postthumb,$user->ID));
}// Use default plain
add_filter(‘wp_mail_content_type’,create_function(”, ‘return “text/plain”; ‘));That will fix the issue!
- The topic ‘How to fix broken reset password links’ is closed to new replies.