Many years ago, sending an email was very simple, but with the growth of spam now you must take many precautions to avoid that the emails you send end up in the spam or junk mail tray.
The safest bet is to use an SMTP server from a company dedicated to sending emails, in this way you avoid the work of maintaining a good reputation on your server and doing everything necessary for your emails to reach the inbox.
NOTE: In this article we are going to use a specific SMTP server, but the part of sending emails works with any SMTP server you choose.
Using an SMTP server costs money, but with sendgrid you can send up to 100 emails a day for free, which may be enough to not have to pay at least while you start your business.
If even so 100 emails seem little to you, you can use the SMTP server of your choice and you can skip to the next section.