Identity Endpoints - Lifetime IEmailSender
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
> I don't know if this is an issue or not but just want to mention that no matter what _lifetime_ the `IEmailSender` is added by user, It will always be created once.
That is a good point. That's the way I made `MapIdentityApi` work prior to this PR, but it is different from the Identity UI razor pages. The default no-op implementation is registered as a singleton.
Do you think it's common to need or want services from the request scope? I guess it probably wouldn't hurt. It's just another parameter to pass around.
_Originally posted by @halter73 in https://github.com/dotnet/aspnetcore/issues/50301#issuecomment-1696365240_
---
After testing with a few email integrations, I noticed there were scoping issues for working with `FluentEmail` SMTP.
A custom MailKit SMTP mailer worked fine.
Contributor guide
Assessment
This issue has not been assessed yet.