Good luck. I also search for a solution to my life, but no success so far.
A couple of questions:
1.- Why would you like to generate a password automatically? How will you remember it? How will the password be?
2.- Why should you send it by mail? The only way to keep it secure is either a secure mail protocol or an encrypted message (you would need another password and the story begins again).
3.- What has all this thing to do with J2EE?
Cheers,
Dian