Sending user authentication email upon signup

Is there somewhere I can see a complete code example for sending a user a ‘welcome’ authentication email ? (the one that when they click on the link, it sets the field ‘emailVerified’ in table User to true?

I think that you don’t have to write any code for that, after you set up sendgrid templates and configure your server to use sendgrid keys and templates, it should work automatically.