muek
muek

Reputation: 1080

Business layer what's best solution to incorporate Email Templates

I'm asking the best solution for a very 'simple' problem.

Today, I have emails templates files and also the logic for sending those emails, on my frontend/website.

Now, I'm improving my code by removing any Mail logic to my BL. So my idea is to have my Business Layer (BL) project, responsible for sending emails, if some business behaviour occur, and not the frontend.

The question that I have, is that I must still be able to change the templates without requiring to compile the BL project.

Do you have any good solution?

Upvotes: 1

Views: 350

Answers (2)

DEVMBM
DEVMBM

Reputation: 492

There are several solutions for this problem , One of them is to save the template in Xml file.

Upvotes: 1

buhtla
buhtla

Reputation: 2909

You can simply add folder in your BL project and put your mail templates in it. Then set build action of each file (mail template) to "Content". Just mark a file, go to properties, then you will see "Build action".

Another solution is to have them saved in database (if you use DB in your project).

Upvotes: 0

Related Questions