customization – personalized registration email by user role

As the title indicates, I need to create a personalized email for the different roles a user connects to. Here is what I have done so far, so much is copied because I still learn:

https://codeshare.io/G8BXLE

The problem is that it would send 2 emails to the user, the first being the personalized email displayed in my code; The second email sent is the default WordPress email, indicating the user name and the link to create a password.

So, what I want is to stop sending the default email, only the custom message should be sent; and also to put the user name and link create a password in my personalized email message. I would appreciate your help to code this 🙂

To give you a brief background: a user would register in our form, enter his details and choose from the drop-down list the package (role) he wanted. Once finished, he should then receive the email corresponding to the package the link to create a password.

* In addition, is there a way to change the role_id? As you can see in my code, the "free" package (role) is randomly generated by problems that follow it. I guess it's done by the theme we bought.

Thank you everyone!