Open levx-me opened 3 months ago
Which email service are you using. https://infisical.com/docs/self-hosting/configuration/envars#email-service
both gmail and resend doesn't work
@levx-me are you able to try Sendgrid?
I faced the same issue when upgrading from infisical/infisical:v0.43.16
to infisical/infisical:v0.51.9-postgres
self-hosted.
Gmail SMTP stopped working.
based on infisical's SMTP docs: https://github.com/Infisical/infisical/blob/246e6c64d1e26f69a0ba8e006a329d8a2c11e919/docs/self-hosting/configuration/envars.mdx?plain=1#L212-L228
not work:
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE="true"
works (port 465):
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_SECURE="true"
works (secure false):
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE="false"
Regarding to node mailer docs, which is used in Infisical (https://github.com/Infisical/infisical/blob/main/backend/package.json#L113)
https://www.nodemailer.com/smtp/
secure – if true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false
I think Infisical docs should be adjusted.
Hmmm @mtracz good point. I think the default values should be adjusted according to this and also doc.
@levx-me Did port 465
resolved issue for you
Describe the bug
Email isn't send using https self-hosted
To Reproduce
Steps to reproduce the behavior:
Expected behavior
An email should be sent
Screenshots
Platform you are having the issue on:
Fedora 39
Additional context
I set up self hosted using docker-compose and I'm accessing it through https using nginx config like: TSL certificate was issued using certbot by letsencrypt and I'm bypassing request to 8001 which docker-compose is run at.