Base solution for your next web application
Open Closed

smtp settings under host #12229


User avatar
0
uenlkr4e created

Hi, i am trying to enter my smpt info under host settings but for some reason whatever i enter no email is sent. so i tried entering some non-sense data and the test email seems like it's sent. the app or the code does not complain about the server or connection, it just tells me that the test email was sent successfully. ss attached.

It acts the same with proper smtp info. says the message is sent but nothing really goes.

is there a setting here or there that i am missing? this is the angular version.

i downloaded the latest version of the app with the following configuration and just ran it. it has the same problem. even the default smpt settings dont complain about sending a test email. acts like the email is successfully sent which is not possible since there is no such smtp server.


5 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi uenlkr4e

    While in Debug mode, sending Email is replaced with the NullEmailSender service. You can comment the part where the IEmailSender class is replaced in the PreInitialize method in *CoreModule.

  • User Avatar
    0
    uenlkr4e created

    I am in dev environment but not in debug mode. That still happens?

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    When you remove the IEmailSender replace part in *CoreModule, it will throw an error if the SMTP settings are incorrect. Or if you run your application in Release mode, it will not perform the replace operation here.

  • User Avatar
    0
    uenlkr4e created

    Thank you, i understand the commenting part and it works after commenting that line.

    I run the app on my local system (localhost) but not in debug mode. Does it act like its in debug mode on localhost? even though it is not in debug mode?

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    Release Mode and Start Without Debugging are different things. Release optimizes for performance and can also include debugging information, while Start Without Debugging runs the application without debugging. If you are testing in a production-like environment, using Release Mode with 'Start Without Debugging' is generally a better approach. You can run EmailSender in Release Mode to test it locally.