Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Send Email not working #6571


User avatar
0
palco.ps created

Hi,

Email request sent but email not recived , the following log show no error occured :

Could you please advice to solve this issue ?

Thanks

INFO 2019-03-01 10:48:35,343 [166 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS http://localhost:22742/api/services/app/HostSettings/SendTestEmail
INFO 2019-03-01 10:48:35,343 [166 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful. INFO 2019-03-01 10:48:35,343 [166 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 0.4648ms 204 INFO 2019-03-01 10:48:35,372 [166 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 POST http://localhost:22742/api/services/app/HostSettings/SendTestEmail application/json 46 INFO 2019-03-01 10:48:35,372 [166 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful. INFO 2019-03-01 10:48:35,840 [166 ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token. INFO 2019-03-01 10:48:35,848 [166 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'ManageSysDemo.Configuration.Host.HostSettingsAppService.SendTestEmail (ManageSysDemo.Application)' INFO 2019-03-01 10:48:35,853 [166 ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {area = "app", action = "SendTestEmail", controller = "HostSettings"}. Executing action ManageSysDemo.Configuration.Host.HostSettingsAppService.SendTestEmail (ManageSysDemo.Application) INFO 2019-03-01 10:48:35,853 [166 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful. INFO 2019-03-01 10:48:35,859 [166 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method ManageSysDemo.Configuration.Host.HostSettingsAppService.SendTestEmail (ManageSysDemo.Application) with arguments (ManageSysDemo.Configuration.Host.Dto.SendTestEmailInput) - Validation state: Valid WARN 2019-03-01 10:48:40,516 [166 ] Abp.Net.Mail.NullEmailSender - USING NullEmailSender! DEBUG 2019-03-01 10:48:40,516 [166 ] Abp.Net.Mail.NullEmailSender - SendEmailAsync: DEBUG 2019-03-01 10:48:40,516 [166 ] Abp.Net.Mail.NullEmailSender - [email protected] DEBUG 2019-03-01 10:48:40,516 [166 ] Abp.Net.Mail.NullEmailSender - DEBUG 2019-03-01 10:48:40,516 [166 ] Abp.Net.Mail.NullEmailSender - تجربة بريد قالب أي بي بي زيرو DEBUG 2019-03-01 10:48:40,516 [166 ] Abp.Net.Mail.NullEmailSender - هذا بريد للتجربة فقط. INFO 2019-03-01 10:48:40,516 [166 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method ManageSysDemo.Configuration.Host.HostSettingsAppService.SendTestEmail (ManageSysDemo.Application), returned result Microsoft.AspNetCore.Mvc.EmptyResult in 4657.0019ms. INFO 2019-03-01 10:48:40,523 [172 ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'. INFO 2019-03-01 10:48:40,523 [172 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action ManageSysDemo.Configuration.Host.HostSettingsAppService.SendTestEmail (ManageSysDemo.Application) in 4669.6369ms INFO 2019-03-01 10:48:40,523 [172 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'ManageSysDemo.Configuration.Host.HostSettingsAppService.SendTestEmail (ManageSysDemo.Application)' INFO 2019-03-01 10:48:40,523 [172 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 5151.4692ms 200 application/json; charset=utf-8


4 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    NullEmailSender doesn't send email.

    Do you have the following line?

    [DependsOn(
        // ...
        typeof(AbpMailKitModule))] // This line
    public class AbpZeroTemplateCoreModule : AbpModule
    

    https://aspnetboilerplate.com/Pages/Documents/Email-Sending#mailkit-integration

  • User Avatar
    0
    palco.ps created

    Hi arron ,

    yes ,

    Thanks

  • User Avatar
    0
    aaron created
    Support Team

    Are you running in debug mode? If so, comment out the following line:

    if (DebugHelper.IsDebug)
    {
        // Disabling email sending in debug mode
        // Configuration.ReplaceService<IEmailSender, NullEmailSender>(DependencyLifeStyle.Transient); // This line
    }
    
  • User Avatar
    0
    palco.ps created

    Hi aaron ,

    it's working properly now.

    Thanks

    Monther