Closed abuhamsa closed 1 year ago
Hi @abuhamsa. Yeh I can see that the error message is being eaten up there. Will push a fix for that in the next release but in the meantime I pushed a new tag to docker hub that should log the error for you. Can you set your tag to log-email-error and see if that helps?
i'll have time to test in a few hours will keep you updated
hi @lukevella the extended error message helped.
it seems that even if I config port 25 and saying it's neither secure or tls that it makes a certificate check.
which leads to an error that my local ip isnt listed in the certificate:
Error sending email Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames
There are maybe like 2 more environment-variables for nodemailer that could be set to help here: https://nodemailer.com/smtp/#tls-options
tls – defines additional [node.js TLSSocket options](https://nodejs.org/api/tls.html#tls_class_tls_tlssocket) to be passed to the socket constructor, eg. {rejectUnauthorized: true}.
tls.servername - is optional hostname for TLS validation if host was set to an IP address
Maybe I'm the only one with this setup so no pressure from my side.
The current available options should be enough if your SMTP server is "properly" configured. I don't know enough about your setup to give advice but I think this can be fixed by updating your certificate to include the hostname of your SMTP server, assuming you're not using an IP address as your SMTP server hostname.
I'll go ahead and close this issue. Thanks for pointing out the missing error log.
assuming you're not using an IP address as your SMTP server hostname.
that's exactly what I do. It is only my homelab. So i thought that should work if i call my internal SMTP-Server over IP
I can work around so I'm fine.
If it's all running inside a local network is it really necessary to use TLS?
of course it's not but even with
SMTP_PORT=25
SMTP_SECURE=false
SMTP_TLS_ENABLED=false
it throws the error above.
Sounds like it's the SMTP server requiring the TLS then. Perhaps you can configure it not to do that.
Hi I'm trying to get rallly running in my homelab. But I'm stuck at the mail delivery. If i try to register any account I get the following output in console:
Error sending email
This seems to be from here https://github.com/lukevella/rallly/blob/1bc749e17a909a77480e7b9eebebe8002ebc0da7/packages/emails/src/send-email.tsx#L123
Any chance to enrich this message?
I logged in to the container and added telnet to see if i can connect to my smtp server over port 25 and this works. I also tried like every possible setting with SMTP_SECURE/SMTP_TLS_ENABLED since my server is also listening to 465 with SSL