DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

SMTP Timeout with Basic Authentication

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





Growing Member





    I am hoping someone can assist me with an SMTP issue.

    I am looking at moving my website to a hosting site as it is currently hosted on site. I migrated my site to the hosting company to test it but I am having issues with the SMTP setup. I simply want to use it as an SMTP relay.

    On the hosting site in Plesk control panel I created an email account called noreply@mydomain with a password. I then setup the SMTP settings using Basic Authentication and used the hosting provider's mail server as the SMTP server, enabled SSL as it uses port 465. Then so our emails won't get bounced I also setup a DKIM key in my DNS.

    When I click on test SMTP though the test times out. To make sure it wasn't my site setup causing the problem I just installed a fresh DNN install on the site and it is doing the same.

    Below is the error in DNN logs. Is anyone able to provide me with assistance for this.

    AbsoluteURL:/API/PersonaBar/ServerSettingsSmtpHost/SendTestEmail
    DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
    ExceptionGUID:8effe8e1-0a62-4d75-a3f1-3ee08537514c
    AssemblyVersion:
    PortalId:-1
    UserId:-1
    TabId:-1
    RawUrl:
    Referrer:
    UserAgent:
    ExceptionHash:qa/JZIzpIonu3jWXl830Fbz8GEI=
    Message:The operation has timed out.
    StackTrace:
       at System.Net.Mail.SmtpClient.Send(MailMessage message)
       at DotNetNuke.Services.Mail.CoreMailProvider.SendMail(MailInfo mailInfo, SmtpInfo smtpInfo)
    InnerMessage:
    InnerStackTrace:
    Source:System
    FileName:
    FileLineNumber:0
    FileColumnNumber:0
    Method:
    Server Name: WEB20






    Veteran Member





      Something interesting in the SMTP server's logfiles?

      Happy DNNing!
      Michael

      Michael Tobisch
      DNN★MVP

      dnnWerk Austria
      DNN Connect





      Growing Member





        It isn't showing any connection on the SMTP server side from the email address noreply@mydomain.





        Growing Member





          I found an old article from 2013 on how to enable SMTP logging in DNN. Followed the instructions to add the code to the webconfig file and ran a new test. Timed out again. Anyone know what I should be looking for in the system net trace log file?
          As a second test I used a website online that runs SMTP tests and it succeeds using the tool. Issue is definitely pointing towards DNN





          Growing Member





            I have another update.

            So from the SMTP logs it appears the SMTP connection is closing prematurely.

            So in the DNN SMTP settings I disabled SSL and switched the port from 465 to port 587 (the non-SSL port) and tried again. This time the test email was sent. So not sure why it won't send with SSL enabled over port 465.





            Growing Member





              That's good you solved it.
              IANA reassigned port 465 to a different service. Some legacy systems still use it. The up-to-date SMTP port is 587, which supports TLS.






              Growing Member





                Problem is that according to my host port 465 is for SSL and port 587 is non-SSL.
                Not sure if this is related but while doing my research on the issue I came across a lot of posts on Github about switching to use MailKitMailProvider for SMTP, but when I look at my webconfig file it says the default provider is "coreMailProvider". Should this be MailKit, I am not sure what the difference is between the two.





                Veteran Member





                  It sounds like you may want to look into using a more contemporary SMTP provider.  If they're not using ports that support TLS, I'd run as fast as I could.  Otherwise, who knows what other security things you may be living with, not knowing it.  We love to use SendGrid, and sometimes Amazon SES.  






                  Advanced Member





                    I vouch for SendGrid too, they have a decent free tier if you only need less than 100 emails going out per day from the site which covers many use cases. Then if you need more, you are probably doing email marketing or similar and it offers a lot of perks to help with delivery/logs/etc.





                    Advanced Member





                      Yes, what they said regarding SendGrid - I highly recommend it.

                      David Poindexter


                      Creator:


                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved