I am trying to send an email to the user when they reset their pw. In the email I would like for there to be a link they click. I am not able to get the a href tag in the email to work properly.
$message = __('Someone requested that the password be reset for your account.') . "\r\n\r\n"; //$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; $message .= network_home_url( '/' ) . "\r\n\r\n"; $message .= __('If this was a mistake, ignore this email and your password will remain the same.') . "\r\n\r\n"; $message .= __('To reset your password, please click on the below link:') . "\r\n\r\n"; $message .= '<a href="' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . '">Reset My Password</a>';
How come this is not working? Is there a better way to do this?
Any help is greatly appreciated!