From the course: ASP.NET Core: Communication Management

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Send an email to multiple receipts using SendGrid

Solution: Send an email to multiple receipts using SendGrid - ASP.NET Core Tutorial

From the course: ASP.NET Core: Communication Management

Start my 1-month free trial

Solution: Send an email to multiple receipts using SendGrid

(uplifting music) - [Narrator] I asked you to send a single email to multiple addresses by first creating a list of addresses, and using an existing method from the mail helper class. Now let us walk through my solution together. In Visual Studio, first go to IEmailService and in here we need to create another signature, so I'll just copy this line and paste it in here. Change the name from SendSingleEmail to SendMultipleEmails, and remove the parameter. Let us save the changes. Now let's go to the email service. So solution explorer, then inside data, services, we have the EmailService.cs file. Then in here, let us implement the interface changes. So implement interface, then scroll down. I'll just copy this method, scroll down to the bottom of the SendSingleEmail and just paste it in here. Now I'll just use the same code from the SendSingleEmail method, so I'll just copy line 24 to line 40 and then just paste in…

Contents