danzuep / MailKitSimplified

Send and receive emails easily, fluently, with one line of code for each operation.
MIT License
61 stars 8 forks source link

can support a dynamic template? #51

Closed DreamTom closed 5 months ago

DreamTom commented 6 months ago

If I have a template but part of the content changes dynamically, can I support the rendering of dynamic templates? I think this feature can be added.

danzuep commented 6 months ago

What does the template use as a placeholder? Assuming it's an HTML template and the placeholder is {{FirstName}}, the simplest option is to use the Replace method to populate it from a variable.

DreamTom commented 5 months ago

thanks a lot, I found a good template rendering engine library called RazorEngineCore, which can help me implement some more complex templates

danzuep commented 5 months ago

Glad you found a solution, looks like a good library.