- ABP Framework version: v4.3.0
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:
I have configured mail setting , using IEmailSender object to send mail but dont receive any email and no error.
12 Answer(s)
-
0
hi
Check your xxxDomainModule. It will use NullEmailSender in DEBUG mode.
#if DEBUG context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>()); #endif
-
0
-
0
HI
Please use this demo to check your mail config.
https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo
-
0
-
0
Please confirm your email config is correct.
https://github.com/abpframework/abp-samples/blob/master/EmailSendDemo/src/EmailSendDemo/Program.cs#L11
-
0
-
0
it uses
SettingProvider
to get the configurationSee the following links:
- https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/EmailSenderConfiguration.cs
- https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs
- https://docs.abp.io/en/abp/latest/Modules/Setting-Management
-
0
it uses
SettingProvider
to get the configurationSee the following links:
I know how to get configuration now, it needs to inject ISettingProvider first,but ApplicationModule.cs dont have the Constructor to inject it.
-
0
hi
Those code are unnecessary. the email module will get the configuration automatically.
https://docs.abp.io/en/abp/latest/Emailing
This is test program, You can use it to confirm your email setting is correct.
https://github.com/abpframework/abp-samples/blob/master/EmailSendDemo/src/EmailSendDemo/Program.cs#L11
-
0
hi
Those code are unnecessary. the email module will get the configuration automatically.
https://docs.abp.io/en/abp/latest/Emailing
This is test program, You can use it to confirm your email setting is correct.
https://github.com/abpframework/abp-samples/blob/master/EmailSendDemo/src/EmailSendDemo/Program.cs#L11
Do you mean I dont need to config email param manually, just need to add mailkit package and using IMailKitSmtpEmailSender to send mail?
-
0
-
0
thanks