Where should I store email templates for emails sent at the end of the batch launch?

So, I write this EXE to process refunds, and when the work is done, we send an email to the list of users, which will probably look like this:

DO NOT REFUSE

Return processing completed. N returns were successfully processed. We encountered N errors. Please check http: //whatever.url for a detailed report.

Thanks,

A computer

DO NOT REFUSE

So, we are not talking about grinding hundreds of letters here, only once a day with relevant information. It is unlikely that this letter will ever be amended and will never be non-technical personnel. How should I store this and process the template in an email? C # String.Format style with {0} and {1} etc.? XML / XSLT (seems like a hassle)? Should I store the template in App.config or put it in a database or something else?

What did I do before StackOverflow? :)

+3
source share
2 answers

I would choose the easy way. I assume that you want to send the HTML email here.

HTML , , . / , # COMPANYNAME #. Project Visual Studio. "" "". HTML (: MyMailTemplate).

Properties.Resources.MyMailTemplate. . # PARAMETER # .

!

+15

, # String.Format . app.config, , .

.

0

Source: https://habr.com/ru/post/1712575/


All Articles