Open Alywan opened 1 month ago
Don't forget to configure these parameters for your SMTP server.
It's configured correctly, other e-mails are working fine. In my case : the register confirmation e-mail is not sent via e-mail.
I have to go with the Admin account, set the new registered user as "Active", and then, he will get the e-mail to reset the password. After that, though, he cannot login, because in the database the "EmailConfirmed" value is 0.
btw, why do i have to setup a password at signup, and after that, when the user gets the confirmation e-mail, he has to reset the password again ?
Btw, this is the error message we get :
[14:08:35 ERR ] Failed to send templated email. Subject: Account Activation Required, Template: _useractivation. An exception occurred.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.FluentEmailServiceCollectionExtensions.<>cDisplayClass0_0.2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>cDisplayClass2_0.
Can you debug and fix this error? also you can check the email template file in the folder \Resources\EmailTemplates_authenticatorcode.cshtml
Can you debug and fix this error?
also you can check the email template file in the folder \Resources\EmailTemplates_authenticatorcode.cshtml
Looks like the dependency container already disposes the service before the service is needed. I would have tried to fix this myself, but I'm currently on vacation to Japan for 3 weeks 😅
Can you debug and fix this error? also you can check the email template file in the folder \Resources\EmailTemplates_authenticatorcode.cshtml
Hard to debug... I have all the files in the correct place.
At this line of code in my MailService i get that error :
else
{
return _fluentEmailFactory
.Create()
.To(to)
.Subject(subject)
.UsingTemplateFromEmbedded(string.Format(TemplatePath, template), model, Assembly.GetEntryAssembly())
.SendAsync();
}
We do not receive any registration confirmation when registering a new user. Is this related to the fact that you deleted the [IdentityNoOpEmailSender.cs] file ?