check out retrieve_password() in wp-login.php it has a retrieve_password_message filter that may be of use.
https://core.trac.ww.wp.xz.cn/browser/tags/3.8.1/src/wp-login.php#L263
I did this and work:
function my_awesome_retrieve_password_message( $content, $key )
{
$input = filter_input( INPUT_POST, 'user_login', FILTER_SANITIZE_STRING );
if( is_email( $input ) )
{
$user = get_user_by( 'email', $user_login );
}
else
{
$user = get_user_by( 'login', sanitize_user( $input ) );
}
$content = '<strong>'.get_bloginfo('name').' - Reimpostazione Password</strong><br/><br/>';
$content .= sprintf( 'Ciao %s, è stata richiesta la reimpostazione della password per il tuo account<br/>', $user->first_name );
$content .= 'Non cliccare sul link in basso se non hai effettuato la richiesta<br/>';
$content .= sprintf( '%s?action=rp&key=%s&login=%s', wp_login_url('url'), $key, $input );
return $content;
}
add_filter ( 'retrieve_password_message', 'my_awesome_retrieve_password_message', 10, 2 );
But the email is sent in text, any way to set it in html? Thank you.
i added this before return $content; at the end of the function.
add_filter( 'wp_mail_content_type', 'set_html_content_type' );
But have no idea how disable it, because disable it with
remove_filter( 'wp_mail_content_type', 'set_html_content_type' );
before end of function will disable html.
However works without disabling it too.