password generation and send mail