Untitled

mail@pastecode.io avatar
unknown
javascript
a month ago
691 B
2
Indexable
Never
var client = new SendGridClient("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");
var from = new EmailAddress("biis@immigration.gov.ph", "donotreply@immigration.gov.ph");
var to = new EmailAddress("SUBJECT EMAIL", $"SUBJECT NAME");
var templateId = "d-2d9a62432d4946868e58bd436f9659ba"; // palitan lang to
var dynamicTemplateData = new
{
FULL_NAME = "",
PASSPORT_NO = "",
};
var msg = MailHelper.CreateSingleTemplateEmail(from, to, templateId, dynamicTemplateData);

var response = await client.SendEmailAsync(msg);

if (response.IsSuccessStatusCode)
 return Ok("Official Receipt has been successfully send.");

// download mo lang yung sendgrid nuget
Leave a Comment