Be warned! This requires that you remove the encryption from your password file, leaving it easily readable by anyone who would have access to the file. Be sure your cgi-bin is secure before you use it.
First, you cannot remove encryption that's already there. I suppose I wasn't clear in what I said before. What I ought to have said is "it removes the fuction of encrypting a password when the user account is created."
Can you use an email address as a password? You probably could, but I don't think it would be a very good idea. Someone's email address is to easy for others to know. For example, if on this forum the email address was used as the password, anyone could post under my user name. All you have to do is look at my profile and you can get my email address and my user name is on every post.
The password needs to be something that is known only to the user and to those who the user decides to tell.
Which brings up another possible problem with saving unencrypted passwords. Many people like to use the same password every time they need one. If they go onto a site where the password is unencrypted and (as in DBMan) the admin has access to the password file, the admin will now know their password. Anyone using the "lookup" mod should pledge, at least to themselves, that they will never abuse this privilege.
To JPDenis, Thank you for your code. In fact, i have already a distinct database which holds username, password, and email addresses, so it is easier. I just need the code to use sendmail. I tried it. It works. Again, thank you ! Parsifal