i know that this answer look's like Sachin Mesare's answer but it's a little bit différente, i will cut my answer to give something in every part of your question
Part 1 : Create User
1 - you have a start of an answer in this post answered by our friend Sachin Mesare Create Alfresco User
2 - you can see this solution maided by Alfresco Community Add a person JAVA API personally i used this method to create and add a person that worked fine for me (do not forget to read all the post : there's an improvement in the bottom)
Part 2 : Send an Email
1 - you can use this wonderful tutorial that give you the path to follow to send an EMail with Java Api Mail Java - Sending Email
2 - you can find so many StackOverFlow questions ( with answers ) that i selected this one Send email using java
Part 3 : Password
you have 2 ways to do something like that
Solution 1 : encrypte/decrypt it (it's a two ways working method) that mean that if you use an algorithme to encrypte it someone can use the same to decrypt your password.
Solution 2 : Hash it that's a one way method that mean if you hash your password no one even you can get the original password, the most well known method to Hash password is sha256
Hope that helped you