0 votes

Using fields (of maybe even just plain text with brackets) (e.g. [Foo]) which do not exist in the data source, an exception is thrown. It would be nicer if these fields were just ignored, and left "as is" within the template text.

by

1 Answer

0 votes

You would never know, that you are using incorrect or misspelled placeholders.

What would you think about the sender, if you got such email:

Dear [FrstName] van der Wal,

...

You can escape [ and ] characters int the email templates using backslashes:

string template = @"\[this is not a placeholder\]";
by (297k points)
...