- $res = mail($email, sprintf( t('Password reset requested at %s'),$a->config['sitename']),
- $email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
- . 'Content-type: text/plain; charset=UTF-8' . "\n"
- . 'Content-transfer-encoding: 8bit' );
+ $sitename = $a->config['sitename'];
+ $siteurl = $a->get_baseurl();
+ $resetlink = $a->get_baseurl() . '/lostpass?verify=' . $new_password;
+
+ $preamble = deindent(t('
+ Dear %1$s,
+ A request was recently received at "%2$s" to reset your account
+ password. In order to confirm this request, please select the verification link
+ below or paste it into your web browser address bar.
+
+ If you did NOT request this change, please DO NOT follow the link
+ provided and ignore and/or delete this email.
+
+ Your password will not be changed unless we can verify that you
+ issued this request.'));
+ $body = deindent(t('
+ Follow this link to verify your identity:
+
+ %1$s
+
+ You will then receive a follow-up message containing the new password.
+ You may change that password from your account settings page after logging in.