• sunriseweb

    (@sunriseweb)


    A plugin sets email content_type set to HTML as follows:

    add_filter('wp_mail_content_type','set_contenttype');
    function set_contenttype($content_type){
      return 'text/html';
    }

    Now password reset email does not display the link to click back to change the password because in wp-login.php the retrieve_password() function puts angle brackets around the link.

    $message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";

    Is the plugin setting email content_type improperly or should the email message formatting in retrieve_password() be changed?

Viewing 1 replies (of 1 total)
  • Thread Starter sunriseweb

    (@sunriseweb)

    Ok – I’m thinking that the plugin should be setting the email content_type inside any notification function – not globally – and password reset emails will always go out as text – but it would be nice if WP system-generated emails supported content_type of text/html in case a plugin does this incorrectly.

Viewing 1 replies (of 1 total)
  • The topic ‘Password reset link not compatible with content_type of text/html’ is closed to new replies.