Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.net Email Template engine [closed]

I'm looking to create emails, mainly HTML, based on templates - I'd really like to do something like:

  1. Set up my template, as an HTML (or similar) file
  2. Include tags, that are then replaced with specific data (kind of like mail-merge....)

I've seen this: http://www.bitethebullet.co.uk/EmailTemplateFramework/tabid/58/Default.aspx

From searching on stack overflow, i understand nVelocity might be another option? But i can't find any examples to do what i want to do...

Any other suggestions?

like image 553
Alex Avatar asked Sep 24 '09 13:09

Alex


2 Answers

This kind of functionality is already built in. See MailDefinition class. For more complex scenarios you might want to consider something like NVelocity. I've had a lot of success with StringTemplate's C# port.

like image 107
RichardOD Avatar answered Sep 28 '22 10:09

RichardOD


I've just released an open source project for precisely this purpose. You can read some more details and grab the source code from my blog.

http://thecodedecanter.wordpress.com/2010/07/19/town-crier-an-open-source-e-mail-templating-engine-for-net/

like image 30
Oenotria Avatar answered Sep 28 '22 11:09

Oenotria