SMTP not working.

Technical Support
  • Hi, I keep on having issues with emails not being sent on my forum.
    The settings are as follows:
    Board is in italian, but as you can see all settings should work just fine.

    I get this error in my log files:

    2020-12-04T17:49:39.391Z [4567/7181] - error: Error: Connection timeout
        at SMTPConnection._formatError (/home/user/NodeBB/node_modules/nodemailer/lib/smtp-connection/index.js:774:19)
        at SMTPConnection._onError (/home/user/NodeBB/node_modules/nodemailer/lib/smtp-connection/index.js:760:20)
        at Timeout.<anonymous> (/home/user/NodeBB/node_modules/nodemailer/lib/smtp-connection/index.js:229:22)
        at listOnTimeout (internal/timers.js:554:17)
        at processTimers (internal/timers.js:497:7)
    2020-12-04T17:49:42.785Z [4567/7181] - error: Error: Connection timeout
        at SMTPConnection._formatError (/home/user/NodeBB/node_modules/nodemailer/lib/smtp-connection/index.js:774:19)
        at SMTPConnection._onError (/home/user/NodeBB/node_modules/nodemailer/lib/smtp-connection/index.js:760:20)
        at Timeout.<anonymous> (/home/user/NodeBB/node_modules/nodemailer/lib/smtp-connection/index.js:229:22)
        at listOnTimeout (internal/timers.js:554:17)
        at processTimers (internal/timers.js:497:7)

    I really can't find a way to solve my issue. Since I own an email with my domain provider (OVH) I really want to be able to use it, instead of relying on a local mailer.

  • Have you tried disabling the connection pool? Have you tried different security settings? Are you sure you have the right port and host?

  • @pitaj Thanks for the reply.
    I've tried with every security setting. I've tried with plugins, I've tried with everything almost.
    I checked if the SMTP outgoing server was correct, and it was. I have no idea why this is happening but it's breaking my forum completely.
    I need my users to register.

    I've also had another issue I wasn't able to see in the logs. When I invite them by mail to register (with local mailer), the log in details are not saved correctly. The user exists but the only way to make their account work is to change their password manually from the ACP.

  • @andrewweb has it worked in the past, but doesn't work now? What version did it last work on?

    Report the invite registration bug on GitHub please.

  • @pitaj To be fair, I haven't set up SMTP servers on NodeBB in the past so I can't tell.
    I upgraded from 1.15.2 to 1.15.5 today to see if it would solve the issue, but no luck.
    I've also changed the forum URL a couple of days ago but all I edited was the config.json file and the reverse proxy on apache.

    The problem is, not even my "test mail" button works on my forum. I have to go on the users tab, and from there send a password reset email. It looks like it's trying to make it hard for me to set it up in any way possible.
    I've also had another issue, where when I invite the users on the email, the /register URL doesn't work so they get a page error.
    I'm starting to think my install could be broken..

    I set up the same email service on the default Mail program in Windows 10, and the configuration works perfectly. I just can't tell what could be wrong with the settings I'm using. Maybe something server side that I have to edit?

    Also, I'll open an issue on GitHub for the registration bug.

  • @andrewweb let me try the SMTP emailer in the next day or so and try to reproduce this.

  • @pitaj As un update, I re-installed by board completely, removed mongo, reinstalled it, create a new database. The problem still stands.
    At this point I'm not sure whether it's the OVH email, the configuration, or the board

  • It works OK on NodeBB 1.15.5 by using port 587 (STARTTLS). Check your spam folder.

      "ts": 1607202161268,
      "type": "delivered",
      "direction": "outbound",
      "uuid": "26CEF09E-1658-4E86-BBA9-C00C92540C4E.1.1",
      "mailFrom": "<[email protected]>",
      "rcptTo": [
        "<[email protected]>"
      "details": {
        "server": {
          "host": "server_domain",
          "ip": "ip_address",
          "port": 25
        "response": "OK id=1klehU-003OtD-MM"
  • I was also unable to reproduce a connection failure. Maybe try with a different SMTP service like Outlook-online or Gmail to know whether it's NodeBB causing the issue?

  • Thank you both for the reply.
    @nhl-pl Is your setup for external SMTP servers, or does it use a local mailer? Did you install anything, like a plugin or maybe something on the server, or is it just what you configured just from the NodeBB ACP?

    @PitaJ I'll try to see if a different service works. Thank you.

  • @andrewweb So... I uninstalled sendmail from the server, even though I wasn't using it, and then changed something in UFW and now the board works.

    I'll see if the issue with registration and password persists, and I'll open a issue on GitHub.
    Thank you both for your kind answers.

Suggested Topics

  • Post's Dropdown Menu Doesn't Work

    Unsolved Technical Support
    0 Votes
    3 Posts

    Works fine in latest firefox.

  • Can't get Nginx to work

    Technical Support
    0 Votes
    7 Posts

    @PitaJ said in Can't get Nginx to work:

    @Goldrush12 said in Can't get Nginx to work:

    I just tried that without success (yes, I made sure to restart NodeBB). Also, the developer mode doesn't fix the problem (contrary to what's stated in the linked thread).

    Okay, so it must be something else.

    I'm not sure if this has anything to do with the issue, but I had a few errors while setting up NodeBB initially, which I had to address.

    Wow, um, big red flag there. How did you install NodeBB in the first place? It may be wise to start from scratch and reinstall with correct permissions from the get-go. You absolutely should not use sudo to install or run NodeBB. The only installation-related things you need root access for are nginx configuration and maybe changing directory privileges before installing NodeBB.

    What OS are you installing NodeBB on? Are you following any tutorials or instructions?

    My OS is Ubuntu 18.04 and I followed a documentation from your website. I started from scratch and it's running fine now! I assume the guide I used must have been outdated, which led to some errors. I must say that it might make sense to clean up the documentary and make sure that only one version of the installation guide for every OS exists to avoid confusion.

    Thank you for your help! 🙂

  • 0 Votes
    2 Posts

    Ahh yeah that's a bit confusing, the merge topic tool can be used between categories, so you should click merge first and then select the topics. The placement seems like a theme/skin issue.

  • dbsearch not work

    Unsolved Technical Support
    0 Votes
    8 Posts
  • Hamburger not working?

    Technical Support
    0 Votes
    6 Posts

    @mj I recently came across this problem and changing the theme from the current to a new theme and then back again, fixed the Hamburger button mobile bug.