skyhop / Mail

A library smoothing email generation from .NET code, by enforcing a strong boundary between the template, and code rendering the template.
Apache License 2.0
11 stars 2 forks source link

Ambiguous behaviour when using within an asp.net core web project #9

Open corstian opened 4 years ago

corstian commented 4 years ago

When using this mail approach from within an asp.net core project, the mail templates will use the shared (layout) components defined within the web project. As such, unexpected behaviour will result.

This should at least be documented.

Possible approaches in order to resolve:

synercoder commented 4 years ago

I would say document it for clarity.

corstian commented 4 years ago

The easiest approach for now to get around that is to just rename the shared layout file, for example from _Layout.cshtml to _MailLayout.cshtml, in order to make sure the correct layout will be found, even when using this library in combination with an asp.net core web site.