Send Email using SendGrid in ASP.Net Core MVC

on Sep 08, 2021 03:27 AM

How to send a dynamic email from Sendgrid in .net core 

I have use this code for send Email but email send with this message (SendGrid.Response)

var sendGridClient = new SendGridClient("SG.W_i24ty6eg.Rg7XZJj1bRSfAMah1nPeaZZj1EdF2xs1Qf_9FTTjTSM");
var sendGridMessage = new SendGridMessage();
sendGridMessage.SetFrom("", "Example");
//The Template Id will be something like this - d-9416e4bc396e4e7fbb658900102abaa2
//Here is the Place holder values you need to replace.
    name = "Anuraj",
    url = ""
var response = await sendGridClient.SendEmailAsync(sendGridMessage);
if (response.StatusCode == System.Net.HttpStatusCode.Accepted)
    await _emailSender.SendEmailAsync(Input.Email, "Confirm your email ", response.ToString());


Download FREE API for Word, Excel and PDF in ASP.Net: Download
Results 1 - 5 of 7
on Sep 08, 2021 03:39 AM

Sir I have use this type

But not working on my side .Simple mail send but not send with send grid template.

on Sep 08, 2021 07:24 AM

Use try catch and let me know if any error?

on Sep 08, 2021 07:26 AM

Sir I have check with try and catch not send any error

on Sep 08, 2021 07:47 AM

I will get back to you tomorrow.

Results 1 - 5 of 7