+1 vote

I am having this problem:

Limilabs.Mail.Templates.TemplateException: '002386' was not found.
at ​ .GetValue(String name) at .Render(StringBuilder writer)
at Limilabs.Mail.Templates.Template.<>c__DisplayClass17_0.b__1(  x) at
System.Collections.Generic.List`1.ForEach(Action`1 action) at
Limilabs.Mail.Templates.Template.Render()
at Limilabs.Mail.ReplyBuilder. (MailBuilder  )
at Limilabs.Mail.ReplyBuilder.  (MailBox  )
at Limilabs.Mail.ReplyBuilder.Reply(MailBox from)
at IG.WA.MAIL.Mail.Reply(Communication _Comm)

Limilabs.Mail.Templates.TemplateException: ' ref' was not found.
at  ​ .GetValue(String name)
at  .Render(StringBuilder writer)
at Limilabs.Mail.Templates.Template.<>c__DisplayClass17_0.<Render>b__1(  x)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Limilabs.Mail.Templates.Template.Render()
at Limilabs.Mail.ReplyBuilder. (MailBuilder   )
at Limilabs.Mail.ReplyBuilder.  (MailBox   )
at Limilabs.Mail.ReplyBuilder.Reply(MailBox from)
at IG.WA.MAIL.Mail.Reply(Communication _Comm)

2 errors above in line:

MailBuilder builder = replyBuilder.Reply(
    new MailBox(_Sender.Config.Email, _Sender.Config.Name));
  • '002386' was not found.
  • ' ref' was not found.

'002386' in mail title: Re: [002386] - ...
' ref' in mail title: ...[ ref:00D00VNwG.5005w1atB4G:ref ]

I do not understand the above error.
Help me fix it.

by

1 Answer

0 votes
 
Best answer

Square brackets - [ ] - are special template characters used to inject property values into the template:

string template = "Hi [FirstName] ...";

Use backslash - \ - to escape them:

string template = "Hi [FirstName], case \[12345\] is resolved";
by (298k points)
...