SMTP: Catch and Display Errors
RickyRomero opened this issue · comments
Takahe 0.9.0 running in Docker.
Takahe should display SMTP errors when they occur. While trying to figure out why my account creation email wasn't coming through, I changed my configuration to something I know will never, ever work:
TAKAHE_EMAIL_SERVER=smtp://testuser:testpass@apple.com:587/?tls=true
This configuration doesn't produce any log output that I can use to troubleshoot the issue, nor does it present any errors in the web UI.
Contrast this to nodemailer
, which throws a timeout when using the same config:
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ETIMEDOUT 17.253.144.10:587
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
errno: -60,
code: 'ESOCKET',
syscall: 'connect',
address: '17.253.144.10',
port: 587,
command: 'CONN'
}
Email isn't deliberately sent from the web threads, so you'd never see it there - the place it would surface is in runstator
. I'm relatively sure that the errors would now surface in its logs after the refactor it got recently, but I do want to check before I close this as done!
Well, this hint may have gotten me unstuck at least. Looks like Stator might not have been running any jobs...
I found the problem – my installation wasn't running Stator, and that's where the errors get logged. I missed the part about Stator in the docs and expected to see the errors in the web logs. 🤷🏻 Up and running now though!
Aha! Good to know!