-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
v8: IEmailSender
not registered in DI container
#11206
Comments
I made a bit of a mess but with some help from @p-m-j I got there in the end! Thanks for the report @mattbrailsford! 👍 |
Fixed in #11206 for 8.17.0. |
Don't think you made a mess at all @nul800sebastiaan, the static helpers for services were the idiomatic way to work in umbraco for so long and I don't think there would have been a problem with adding one as long as the service was registered in the container. Edit: Not having them is also fine, we should be encouraging constructor injection, especially for those preparing to move 8->9 |
Ah I was just referring to the mess with multiple PRs and forgetting to revert stuff. The final commit is nice and clean! |
Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8
Umbraco v8.17.0-rc2
Bug summary
Umbraco has a
IEmailSender
for helping sending emails, but this isn't registered in the DI container like it is in v9. It currently requires use of a hard coded EmailSender class.Specifics
No response
Steps to reproduce
Accept an
IEmailSender
constructor dependency.Run application
Get error because it's not registered in container
Expected result / actual result
IEmailSender
should be registered with the DI container and should successfully resolve as a constructor arg.The text was updated successfully, but these errors were encountered: