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.
Send an email to a single receipt using SendGrid - ASP.NET Core Tutorial
From the course: ASP.NET Core: Communication Management
Send an email to a single receipt using SendGrid
- [Instructor] Now that you have set up both the SendGrid account and the development environment, let's send the first email. For that let's go to Visual Studio and see it in action. In here go to Solution Explorer, then Data, Services, EmailService. And you scroll down to the SendSingleEmail method where we are going to write all the necessary code. The only thing that we have in here is the API key. So using the API key, we are going to create the SendGrid client and define all the necessary data. So let us first create the client. So var client is equal to new SendGridClient and let us specify parameter the API key. Then next, we need to define the email address from where we are going to send the email to the user. So there's going to be var from, is equal to new EmailAddress. Let us import the necessary namespace which is the SendGrid one. So SendGrid.helpers.mail. These takes two parameters. The first one is…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Set up a SendGrid account6m 39s
-
(Locked)
Set up a SendGrid development environment10m 53s
-
(Locked)
Send an email to a single receipt using SendGrid7m 22s
-
(Locked)
Challenge: Send an email to multiple receipts using SendGrid57s
-
(Locked)
Solution: Send an email to multiple receipts using SendGrid5m 30s
-
(Locked)
Send an attachment using SendGrid7m 59s
-
-
-