Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
corstian opened this issue Jan 10, 2020 · 2 comments
Open
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@corstian
Copy link
Member

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:

  • Try to separate the loaded views, and only load certain view assemblies (or app parts) for the mail dispatcher.
  • Specifically define which layout file should be used
@corstian corstian added bug Something isn't working documentation Improvements or additions to documentation labels Jan 10, 2020
@synercoder
Copy link
Collaborator

I would say document it for clarity.

@corstian
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants