public async Task EmailGeneralSupportQueue(SupportCase supportCase) { var templateData = new EmailTemplate <SupportTemplateData>() { Data = new SupportTemplateData { DynamicPropertyName1 = "FirstName", DynamicPropertyValue1 = supportCase.FirstName, DynamicPropertyName2 = "LastName", DynamicPropertyValue2 = supportCase.LastName, DynamicPropertyName3 = "Email", DynamicPropertyValue3 = supportCase.Email, DynamicPropertyName4 = "Vendor", DynamicPropertyValue4 = supportCase.Vendor ?? "N/A", }, Message = new EmailDisplayText() { EmailSubject = supportCase.Subject, DynamicText = supportCase.Message } }; var recipient = SendgridMappers.DetermineRecipient(_settings, supportCase.Subject); await SendSingleTemplateEmailSingleRcptAttachment(_settings?.SendgridSettings?.FromEmail, recipient, _settings?.SendgridSettings?.CriticalSupportTemplateID, templateData, supportCase.File); }
public async Task EmailGeneralSupportQueue(SupportCase supportCase) { var templateData = new EmailTemplate <SupportTemplateData>() { Data = new SupportTemplateData { FirstName = supportCase?.FirstName, LastName = supportCase?.LastName, Email = supportCase?.Email, Vendor = supportCase?.Vendor ?? "N/A" }, Message = new EmailDisplayText() { EmailSubject = supportCase.Subject, DynamicText = supportCase.Message } }; var recipient = SendgridMappers.DetermineRecipient(_settings, supportCase.Subject); await SendSingleTemplateEmailSingleRcptAttachment(_settings?.SendgridSettings?.FromEmail, recipient, _settings?.SendgridSettings?.CriticalSupportTemplateID, templateData, supportCase.File); }