Ends in:
2 DAYS
11 HRS
6 MIN
25 SEC
Ends in:
2 D
11 H
6 M
25 S
Open Closed

Forgot Password- password reset code/link not send to email #1790


User avatar
0
Shoba24 created
  • ABP Framework version: v4.4.1
  • UI type: MVC
  • DB provider: EF Core
  • **Tiered (MVC)*: yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi, Forgot password is not working in our abp application.If we enter our email,we get this message but we didn't get reset code/link in mail.We are using smtp settings.This Smtp settings works well in other .net core application .But in abp framework ,it is not working.

Thanks


7 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can try to remove this line.

    #if DEBUG
        context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
    #endif
    
  • User Avatar
    0
    Shoba24 created

    Hi,

    We removed this line.After removing ,i get this error when submit email

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi @Shoba24, it seems your credentials are wrong. Can you check your username and password in smtp settings?

    • Abp.Mailing.Smtp.Password must be an encrypted value. (https://docs.abp.io/en/abp/4.4/Emailing#encrypt-the-smtp-password)
    • So you may want to define your password by using SettingManager. It internally encrypts the values on set and decrypts on get.
    public class YourDomainModule : AbpModule
    {
       public override void OnApplicationInitialization(ApplicationInitializationContext context)
       {
          var settingManager = context.ServiceProvider.GetService<SettingManager>();
                
          //encrypts the password on set and decrypts on get
          settingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, "your_password");
       }
          
        //...  
    }   
    
  • User Avatar
    0
    Shoba24 created

    we used separate email function with same smtp settings in our code.we got test mail.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi Shoba24

    You can use this demo to test your settings.

    https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo

  • User Avatar
    0
    Shoba24 created

    I got this error when using demo app.This is for mailkit option

    when using smtp option ,I got same error like before"Mail box is not available"

  • User Avatar
    0
    Shoba24 created

    We resolved this issue.

    Thanks!

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35