Creating Email Template In Content Hub Programmatically
Hello everyone, In this blog we will see, how we can create mail template programatically in Sitecore Content Hub. So let's quickly try to see the code and we will understand it afterwwards. using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; using Stylelabs.M.Sdk; using Stylelabs.M.Sdk.Models.Notifications; using Stylelabs.M.Sdk.Contracts.Notifications; using Stylelabs.M.Sdk.Contracts.Base; using Stylelabs.M.Sdk.Contracts.Content; using Stylelabs.M.Base.Querying; using Stylelabs.M.Base.Querying.Filters; CultureInfo culture = CultureInfo.GetCultureInfo("en-US"); MClient.Logger.Info($"SS - Creating Email Template"); IMailTemplate template = await MClient.EntityFactory.CreateAsync(Constants.MailTemplate.DefinitionName) as IMailTemplate; template.Name = "MailNotificationReject"; template.SetSubject(culture, "SS Mail Notification Reject"); template.SetBody(culture, "Email...