SMTP not working.
-
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] - [31merror[39m: 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] - [31merror[39m: 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.
-
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.