0

How to send user password during registration. I have to send html email when user register in the site using rules module in drupal 7 and i have to send the username and user password in that mail. i used [account:name] and [account:password] or [user:password] but i did not get the user password on my mail.

1
  • for sending password with mail you have to write some php code in body of the email you want to send through rules in php evaluations. Dec 10, 2014 at 14:12

2 Answers 2

2

This doesn't answer the question, but it has to be said.

You should not e-mail users their password.

It's highly irresponsible to do so.

There are strong reasons for Drupals default behaviour.

People tend to re-use their passwords in lots of places, and e-mails are not a secure communications channel.

If your end user re-uses the password for their VPN tunnel, and login to their e-mail over an unencrypted channel, (no https for the e-mail, and no password on the local wifi for example), then you have just broadcasted that password for the world to see. And now you've facilitated the cyber attack on their workplace. There's probably a large number of both known and unknown ways to compromise the passwords as well. NSA are practically guaranteed to get it.

Don't do it.

Yes, it's the users fault for re-using their password and not requiring HTTPS to their mail and a strong password on the wifi, but you are the developer and need to know better.

1

This question may already have been answered:

Send user's password in mail

Email is not fully secure. It would seem problematic to send the user's password in this manner.

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