mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 13:37:28 +00:00
Fixes smtp secure port settings (#1039)
This commit is contained in:
parent
b1bebf0990
commit
367617d678
2 changed files with 4 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ DEFAULT_FROM_EMAIL=hello@tooljet.io
|
|||
SMTP_USERNAME=
|
||||
SMTP_PASSWORD=
|
||||
SMTP_DOMAIN=
|
||||
SMTP_ADDRESS=
|
||||
SMTP_PORT=
|
||||
|
||||
# DISABLE USER SIGNUPS (true or false). Default: true
|
||||
DISABLE_SIGNUPS=
|
||||
|
|
|
|||
|
|
@ -15,9 +15,11 @@ export class EmailService {
|
|||
}
|
||||
|
||||
async sendEmail(to: string, subject: string, html: string) {
|
||||
const port = +process.env.SMTP_PORT || 587;
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: process.env.SMTP_DOMAIN,
|
||||
port: process.env.SMTP_PORT || 587,
|
||||
port: port,
|
||||
secure: port == 465,
|
||||
auth: {
|
||||
user: process.env.SMTP_USERNAME,
|
||||
pass: process.env.SMTP_PASSWORD,
|
||||
|
|
|
|||
Loading…
Reference in a new issue