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

smtp configuration #1032


User avatar
0
odn created

Hi,

I entered the smtp server configuration details in the host section , but it seems not to work. When I register a new user, the registration email is not going to be sent. The smtp server on another machine does not need any credientials, messages only have to be sent from an accepted ip adress and the 'send from' field must end with a given domain name. In asp.net zero I can either configure it to accept standard credentials (windows) or enter credentilas (user / password / domain). Any other way to configure the smtp server? When sending test emails within a console application , all works fine. Any other configuration that needs to be done?

Thanks for your kind help.

Oliver


5 Answer(s)
  • User Avatar
    0
    moustafa created

    Hello Oliver please note that by default sending emails are disabled in debug mode

    you can enable it yourself , you can find code repsponsible for that in ProjectCore Solution at ProjectCoreModule.cs

    if (DebugHelper.IsDebug)
                {
                //Disabling email sending in debug mode
                IocManager.Register<IEmailSender, NullEmailSender>(DependencyLifeStyle.Transient);
                }
    

    hope that help , good luck

  • User Avatar
    0
    odn created

    Thanks for this hint, but unfortunately this didn't solve the problem.

    I tried 1.) disabling registering NullEmailSender 2.) registering SMTPEmailSender

    The web site displays "an internal error occured" without further details when trying to activate "send activation email". Output shows "A first chance exception of type 'Abp.AbpException' occurred in mscorlib.dll"

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Have you checked logs under web project?

    Also, you don't need to register SMTPEmailSender manually, it's automatically done when you remove NullEmailSender registration.

  • User Avatar
    0
    odn created

    I managed getting it to work.

    Abp complains "Setting value for 'Abp.Net.Mail.Smtp.UserName' is null or empty". I switched to "use default credentials" (even though I don't need any credentials as the smtp server only checks for a specific ip range). Actually I did want to avoid this, but this seems the only way to do it [correction: enter fake values for domain/user/password will do it as well].

    Thanks for all ypur help.

    Oliver

  • User Avatar
    0
    moustafa created

    can you please explain the problem and solution in more details because i have the same problem so when i need to send email i use simple email method