Skip to content

Commit

Permalink
✨Be able to use SMTP transport without TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
shepilov committed Mar 1, 2024
1 parent ac30657 commit 490c883
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tdrive/backend/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tdrive/backend/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"@types/node-cron": "^3.0.0",
"@types/node-fetch": "^2.5.12",
"@types/node-uuid": "^0.0.28",
"@types/nodemailer": "^6.4.14",
"@types/pdf-image": "^2.0.1",
"@types/pg-pool": "^2.0.6",
"@types/pump": "^1.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export default class EmailPusherClass
host: this.configuration.get<string>("smtp_host", ""),
port: this.configuration.get<number>("smtp_port", 25),
secure: false,
ignoreTLS: !this.configuration.get<boolean>("smtp_tls", false),
requireTLS: this.configuration.get<boolean>("smtp_tls", true),
};
this.logger.info(`Start SMTP client with configuration: ${JSON.stringify(smtpConfig)}`);
this.transporter = nodemailer.createTransport(smtpConfig);
this.sender = this.configuration.get<string>("sender", "");
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export type SMTPClientConfigType = {
port: number;
secure?: boolean;
requireTLS?: boolean;
ignoreTLS?: boolean;
auth?: {
user: string;
pass: string;
Expand Down
7 changes: 7 additions & 0 deletions tdrive/backend/node/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,13 @@
resolved "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz"
integrity sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==

"@types/nodemailer@^6.4.14":
version "6.4.14"
resolved "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.14.tgz"
integrity sha512-fUWthHO9k9DSdPCSPRqcu6TWhYyxTBg382vlNIttSe9M7XfsT06y0f24KHXtbnijPGGRIcVvdKHTNikOI6qiHA==
dependencies:
"@types/node" "*"

"@types/normalize-package-data@^2.4.0":
version "2.4.1"
resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz"
Expand Down

0 comments on commit 490c883

Please sign in to comment.