Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created December 16, 2023 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/2ffd95d0fbde5c077eb82fa72bb671c5 to your computer and use it in GitHub Desktop.
Save bjoerntx/2ffd95d0fbde5c077eb82fa72bb671c5 to your computer and use it in GitHub Desktop.
using (MailMerge mm = new MailMerge())
{
mm.TextComponent = tx;
mm.RemoveEmptyFields = false;
// load json data
string json = System.IO.File.ReadAllText("App_Data/data.json");
// merge data
mm.MergeJsonData(json, true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment