Successfully able to generate a password and automatically send it to the doctors email address after it is entered in  the database.