TranslateEmailTemplate
Interface Function

Using the mapping data to replace the corresponding email template, and return the email information including Subject, Content, MailFrom and ReplyTo.

Request Parameter
Parameter Required Type Remarks
emailTempCode Yes String Email template code
mappingData No Dictionary The email template's parameters are replaced by this parameter.
Return Data Type(Data)

Success: it's true if success, or false if fail.

Message: the value will not be empty if error occurs, it shows the error message.

Data (EmailArg): the returned EmailArg, and the property Subject & Content shouldn't be null.

public class ResultMsg<EmailArg>
{
  public bool Success { get; set; }
  public string Message { get; set; }
  public EmailArg Data { get; set; }
}

public class EmailArg
{
  public string[] To { get; set; }
  public string Group { get; set; }
  public string From { get; set; }
  public string ReplyTo { get; set; }
  public string Cc { get; set; }
  public string Bcc { get; set; }
  public string Subject { get; set; }
  public string Content { get; set; }
  public string SubmitBy { get; set; }
}
Code example
var emailTempCode = "ABC";
var mappingData = new Dictionary<string,string> { {"Field_A","A"},{"Field_B","B"},{"Field_C", "C"}};
var result = Service.TranslateEmailTemplate(templateCode, mappingData);

Service.ConsoleLog("TranslateEmailTemplate result", result);
© Digital Maker Product Team all right reserved,powered by Gitbook该文件修订时间: 2023-02-02 10:40:11

results matching ""

    No results matching ""