Town Crier 1.1 now available on NuGet
June 3, 2011 § Leave a Comment
Town Crier can now be downloaded from NuGet
There is now also some built in markdown support (thanks to friism). This provides a convenient way to send HTML emails where possible but with a human readable plaintext alternative whilst only writing one template:
var factory = new MergedEmailFactory(new TemplateParser());
var tokenValues = new Dictionary<string, string>
{
{"name", "Joe"},
{"userid", "123"}
};
MailMessage message = factory
.WithTokenValues(tokenValues)
.WithSubject("Test Subject")
.WithMarkdownBodyFromFile(@"templates\sample-markdown.txt")
.Create();
To install Town Crier into your project from the Visual Studio Package Console:
install-package towncrier