And
man newusers
Your first step is to define which info is required in a file. As your script is using newusers, I suggest that you keep the format the same as required by newusers. You can use the gecos field to store the email address and database name.
- create a script that invokes newusers to add the new user to the system
- extend the script to extract the database name and the username from the file
- extend the script to use this data to create a database and grant permissions
- extend the script to extract the email address from the file
- extend the script to mail the file content to the email address
There is a lot of error checking to do (system user already exists, home directory already exists, database already exists, database user already exists, invalid email address)
You can test everything and once you're happy, add it to cron