Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

✨ Add SMTP_TLS_SERVERNAME env var for explicit SNI configuration (#2298)

Luke Vella5c6adcfd4d53
diff --git a/apps/docs/self-hosting/configuration.mdx b/apps/docs/self-hosting/configuration.mdx
index 4a5d4628b..1d8f02a54 100644
--- a/apps/docs/self-hosting/configuration.mdx
+++ b/apps/docs/self-hosting/configuration.mdx
@@ -65,6 +65,12 @@ description: Using environment variable to configure a self-hosted instance of R
<Note>This option is only available from v4.4.0 and later.</Note>
</ParamField>
+<ParamField path="SMTP_TLS_SERVERNAME">
+ Explicitly sets the server name for SNI (Server Name Indication) during the TLS handshake. Only needed for SMTP servers that host multiple certificates and require SNI to return the correct one. In most cases this is not required.
+
+ <Note>This option is only available from v4.8.0 and later.</Note>
+</ParamField>
+
<ParamField path="SMTP_TLS_ENABLED">
<Warning>Deprecated: Use `SMTP_REJECT_UNAUTHORIZED=false` to disable certificate validation</Warning>
Legacy option that is no longer used
diff --git a/packages/emails/src/send-email.tsx b/packages/emails/src/send-email.tsx
index be0ecbfdc..0ab5adf65 100644
--- a/packages/emails/src/send-email.tsx
+++ b/packages/emails/src/send-email.tsx
@@ -208,6 +208,7 @@ export class EmailClient {
: undefined,
tls: {
rejectUnauthorized,
+ servername: process.env.SMTP_TLS_SERVERNAME,
},
});
break;