From the course: React: Authentication (2021)

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Sending emails from Node

Sending emails from Node

- [Instructor] Now that we've got our email provider set up, we've got the SendGrid API key added and everything, you're going to see that the next thing in the steps says, send your first email. And if you want, you can just copy and paste the code that they have here and test it for yourself. But we're actually going to do something a little bit different. So let's head over to our backend and inside our Routes folder, we're going to create a new route for testing our emails. This will just be something that will be useful for us to make sure we have everything set up correctly. So let's create a new file here, we'll call it testEmailRoute.js and we're also going to create a new utility function for sending emails. So let's actually create a new folder in our backend we'll call it util and inside there let's create a new file which we'll call sendEmail.js. I've usually found that it's just very helpful to abstract…

Contents