🧑💻 (smtp) Use secure prop instead of ignoreTLS
BREAKING CHANGE: The SMTP_IGNORE_TLS environment has been removed in favore of SMTP_SECURE. If SMTP_SECURE is 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
This commit is contained in:
@ -32,11 +32,13 @@ if (isNotEmpty(env('SMTP_FROM')) && process.env.SMTP_AUTH_DISABLED !== 'true')
|
||||
server: {
|
||||
host: process.env.SMTP_HOST,
|
||||
port: process.env.SMTP_PORT ? Number(process.env.SMTP_PORT) : 25,
|
||||
secure: process.env.SMTP_SECURE
|
||||
? process.env.SMTP_SECURE === 'true'
|
||||
: false,
|
||||
auth: {
|
||||
user: process.env.SMTP_USERNAME,
|
||||
pass: process.env.SMTP_PASSWORD,
|
||||
},
|
||||
ignoreTLS: process.env.SMTP_IGNORE_TLS === 'true',
|
||||
},
|
||||
from: env('SMTP_FROM'),
|
||||
})
|
||||
|
@ -22,15 +22,15 @@ import { SponsorButton } from '../../../src/js/SponsorButton.jsx'
|
||||
|
||||
Used for sending email notifications and authentication
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| --------------------- | ------- | ------------------------------------------------------------------------------------------ |
|
||||
| SMTP_USERNAME | -- | SMTP username |
|
||||
| SMTP_PASSWORD | -- | SMTP password |
|
||||
| SMTP_HOST | -- | SMTP host. (i.e. `smtp.host.com`) |
|
||||
| SMTP_PORT | 25 | SMTP port |
|
||||
| NEXT_PUBLIC_SMTP_FROM | - | From name and email (i.e. `'Typebot Notifications' <notifications@host.com>`) |
|
||||
| SMTP_AUTH_DISABLED | false | To disable the authentication by email but still use the provided config for notifications |
|
||||
| SMTP_IGNORE_TLS | false | Don't use TLS even if the server supports STARTTLS extension |
|
||||
| Parameter | Default | Description |
|
||||
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| SMTP_USERNAME | -- | SMTP username |
|
||||
| SMTP_PASSWORD | -- | SMTP password |
|
||||
| SMTP_HOST | -- | SMTP host. (i.e. `smtp.host.com`) |
|
||||
| SMTP_PORT | 25 | SMTP port |
|
||||
| NEXT_PUBLIC_SMTP_FROM | - | From name and email (i.e. `'Typebot Notifications' <notifications@host.com>`) |
|
||||
| SMTP_SECURE | false | 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 |
|
||||
| SMTP_AUTH_DISABLED | false | To disable the authentication by email but still use the provided config for notifications |
|
||||
|
||||
## Google (Auth, Sheets, Fonts)
|
||||
|
||||
|
@ -19,14 +19,14 @@ import { SponsorButton } from '../../../src/js/SponsorButton.jsx'
|
||||
|
||||
Used for sending email notifications and authentication
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| --------------- | ------- | ------------------------------------------------------------------------------- |
|
||||
| SMTP_USERNAME | -- | SMTP username |
|
||||
| SMTP_PASSWORD | -- | SMTP password |
|
||||
| SMTP_HOST | -- | SMTP host. (i.e. `smtp.host.com`) |
|
||||
| SMTP_PORT | 25 | SMTP port |
|
||||
| SMTP_FROM | - | From name and email (i.e. `'Typebot Notifications' <notifications@typebot.io>`) |
|
||||
| SMTP_IGNORE_TLS | false | Don't use TLS even if the server supports STARTTLS extension |
|
||||
| Parameter | Default | Description |
|
||||
| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| SMTP_USERNAME | -- | SMTP username |
|
||||
| SMTP_PASSWORD | -- | SMTP password |
|
||||
| SMTP_HOST | -- | SMTP host. (i.e. `smtp.host.com`) |
|
||||
| SMTP_PORT | 25 | SMTP port |
|
||||
| SMTP_FROM | - | From name and email (i.e. `'Typebot Notifications' <notifications@typebot.io>`) |
|
||||
| SMTP_SECURE | false | 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 |
|
||||
|
||||
## Google (Sheets)
|
||||
|
||||
|
@ -32,11 +32,11 @@ const cors = initMiddleware(Cors())
|
||||
const defaultTransportOptions = {
|
||||
host: process.env.SMTP_HOST,
|
||||
port: Number(process.env.SMTP_PORT),
|
||||
secure: process.env.SMTP_SECURE ? process.env.SMTP_SECURE === 'true' : false,
|
||||
auth: {
|
||||
user: process.env.SMTP_USERNAME,
|
||||
pass: process.env.SMTP_PASSWORD,
|
||||
},
|
||||
ignoreTLS: process.env.SMTP_IGNORE_TLS === 'true',
|
||||
}
|
||||
|
||||
const defaultFrom = {
|
||||
|
Reference in New Issue
Block a user