Skip to content

Commit 27f6141

Browse files
authored
🤖 Merge PR DefinitelyTyped#74407 fix(nodemailer): Add missing secured option by @oldium
1 parent df699c6 commit 27f6141

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

types/nodemailer/lib/smtp-connection/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ declare namespace SMTPConnection {
137137
auth?: AuthenticationType | undefined;
138138
/** defines if the connection should use SSL (if true) or not (if false) */
139139
secure?: boolean | undefined;
140+
/** indicates that the provided socket has already been upgraded to TLS (if true) */
141+
secured?: boolean | undefined;
140142
/** turns off STARTTLS support if true */
141143
ignoreTLS?: boolean | undefined;
142144
/** forces the client to use STARTTLS. Returns an error if upgrading the connection is not possible or fails. */

types/nodemailer/nodemailer-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@ function dkim_specific_header_key_test() {
14781478
// SMTP Connection
14791479

14801480
function smtp_connection_test() {
1481-
const connection = new SMTPConnection();
1481+
const connection = new SMTPConnection({ secure: true, secured: true });
14821482
connection.connect(err => {
14831483
if (err) throw err;
14841484
connection.login({ user: "user", pass: "pass" }, err => {

types/nodemailer/v6/lib/smtp-connection/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ declare namespace SMTPConnection {
137137
auth?: AuthenticationType | undefined;
138138
/** defines if the connection should use SSL (if true) or not (if false) */
139139
secure?: boolean | undefined;
140+
/** indicates that the provided socket has already been upgraded to TLS (if true) */
141+
secured?: boolean | undefined;
140142
/** turns off STARTTLS support if true */
141143
ignoreTLS?: boolean | undefined;
142144
/** forces the client to use STARTTLS. Returns an error if upgrading the connection is not possible or fails. */

types/nodemailer/v6/nodemailer-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ function dkim_specific_header_key_test() {
14481448
// SMTP Connection
14491449

14501450
function smtp_connection_test() {
1451-
const connection = new SMTPConnection();
1451+
const connection = new SMTPConnection({ secure: true, secured: true });
14521452
connection.connect(err => {
14531453
if (err) throw err;
14541454
connection.login({ user: "user", pass: "pass" }, err => {

0 commit comments

Comments
 (0)