This is my code..
var client = new SendGridClient(SendGridEmailEntity.Key);
var from = new EmailAddress(SendGridEmailEntity.Mail, SendGridEmailEntity.DisplayName);
var subject = templateRecord.EmailFrm.SubjectName;
var to = new EmailAddress(activeQueueEntities[i].EmailId, activeQueueEntities[i].Name);
var plainTextContent = "";
var htmlContent = templateRecord.TemplateContent;
var msg = MailHelper.CreateSingleEmail(from, to, subject, plainTextContent, htmlContent);
Solved using Below Code...
var client = new SendGridClient(SendGridEmailEntity.Key);
var from = new EmailAddress(SendGridEmailEntity.Mail, SendGridEmailEntity.DisplayName);
var subject = templateRecord.EmailFrm.SubjectName;
var to = new EmailAddress(activeQueueEntities[i].EmailId, activeQueueEntities[i].Name);
var htmlContent = templateRecord.TemplateContent;
var msg = new SendGridMessage()
{
From = from,
Subject = subject,
HtmlContent = htmlContent,
};
msg.AddTo(to);
msg.AddCcs(CCs);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With