Configure mail and database.