When we click on "Forgot your password" and enter email id, Drupal will send password reset URL by mail.

But is it possible Drupal send any random password by email instead of URL?

I have checked Registration Password Token but this will helpful for new user registration only.

Is there any module available?

  • 1
    It is possible. Also, because such password will be accessible for email server admins etc, it very well might be illegal as possibly compromising customer's data. In Poland it is officially discouraged by GIODO ( Inspector General for the Protection of Personal Data) and thus makes site operator responsible for any password misuse, and all rules about people responsible for what they do - void. Rationale: if you send a link, the attack window is short. If you send password, any admin (or anyone who hacked mailserver) can access it at any time...
    – Mołot
    Commented Jul 13, 2015 at 8:35
  • 1
    Actually I am developing iOS app(Drupal Services module), where if someone enter his/her email id in "Forgot password" text box, he/she should receive password by email instead of redirecting him/her on website Commented Jul 14, 2015 at 7:06
  • 1
    @FirozSabaliya - What did you end up using? Commented Oct 20, 2018 at 11:57
  • I have used Recovery password module. drupal.org/project/recovery_pass Commented Oct 21, 2018 at 15:18

1 Answer 1


You can use Recovery Password (Email New Password) module.

Drupal by default sends Password Reset URL by mail to user's email id in password recovery mail, but Recovery Password module makes it possible for Drupal to send any random generated password(new password) by email instead of URL to the user.

Recovery Password Module alters default Drupal password reset process and makes it possible to send the new password in the recovery email itself. In this case, when user clicks on forgot password providing valid username or email address, new password is generated randomly and is sent to the user email address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.