Skip to content

Commit d18c50c

Browse files
Peter XiePeter Xie
authored andcommitted
fix outlook smtp number
1 parent 71531be commit d18c50c

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

app/public/scripts/home.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ const getImapSmtpHost = (email) => {
133133
{
134134
ret.imap = 'imap-mail.outlook.com';
135135
ret.smtp = 'smtp-mail.outlook.com';
136+
ret.SmtpPort = [587];
136137
}
137138
break;
138139
// apple mail

app/public/scripts/home.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ const getImapSmtpHost = ( email: string ) => {
163163
case 'hotmail.com':
164164
case 'outlook.com': {
165165
ret.imap = 'imap-mail.outlook.com'
166-
ret.smtp = 'smtp-mail.outlook.com'
166+
ret.smtp = 'smtp-mail.outlook.com'
167+
ret.SmtpPort = [587]
167168
}
168169
break;
169170

app/server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,15 +1043,15 @@ class localServer {
10431043
host: Net.isIP(imapData.smtpServer) ? null : imapData.smtpServer,
10441044
hostname: Net.isIP(imapData.smtpServer) ? imapData.smtpServer : null,
10451045
port: imapData.smtpPortNumber,
1046-
secure: /outlook\.com$|me\.com$/.test(imapData.smtpServer) ? false : imapData.smtpSsl,
1046+
secure: /\.outlook\.com$|\.me\.com$/.test(imapData.smtpServer) ? false : imapData.smtpSsl,
10471047
auth: {
10481048
user: imapData.smtpUserName,
10491049
pass: imapData.smtpUserPassword
10501050
},
10511051
connectionTimeout: (1000 * 15).toString(),
10521052
tls: {
10531053
rejectUnauthorized: imapData.smtpIgnoreCertificate,
1054-
ciphers: /outlook\.com$|me\.com$/.test(imapData.smtpServer) ? 'SSLv3' : null
1054+
ciphers: /\.outlook\.com$|\.me\.com$/.test(imapData.smtpServer) ? 'SSLv3' : null
10551055
}
10561056
};
10571057
saveLog(JSON.stringify(option));
@@ -1074,15 +1074,15 @@ class localServer {
10741074
host: Net.isIP(imapData.smtpServer) ? null : imapData.smtpServer,
10751075
hostname: Net.isIP(imapData.smtpServer) ? imapData.smtpServer : null,
10761076
port: imapData.smtpPortNumber,
1077-
secure: /outlook\.com$|me\.com$/.test(imapData.smtpServer) ? false : imapData.smtpSsl,
1077+
secure: /\.outlook\.com$|\.me\.com$/.test(imapData.smtpServer) ? false : imapData.smtpSsl,
10781078
auth: {
10791079
user: imapData.smtpUserName,
10801080
pass: imapData.smtpUserPassword
10811081
},
10821082
connectionTimeout: (1000 * 15).toString(),
10831083
tls: {
10841084
rejectUnauthorized: imapData.smtpIgnoreCertificate,
1085-
ciphers: /outlook\.com$|me\.com$/.test(imapData.smtpServer) ? 'SSLv3' : null
1085+
ciphers: /\.outlook\.com$|\.me\.com$/.test(imapData.smtpServer) ? 'SSLv3' : null
10861086
}
10871087
};
10881088
const transporter = Nodemailer.createTransport(option);

app/server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,15 +1224,15 @@ export class localServer {
12241224
host: Net.isIP ( imapData.smtpServer ) ? null : imapData.smtpServer,
12251225
hostname: Net.isIP ( imapData.smtpServer ) ? imapData.smtpServer : null,
12261226
port: imapData.smtpPortNumber,
1227-
secure: /outlook\.com$|me\.com$/.test ( imapData.smtpServer ) ? false : imapData.smtpSsl,
1227+
secure: /\.outlook\.com$|\.me\.com$/.test ( imapData.smtpServer ) ? false : imapData.smtpSsl,
12281228
auth: {
12291229
user: imapData.smtpUserName,
12301230
pass: imapData.smtpUserPassword
12311231
},
12321232
connectionTimeout: (1000 * 15).toString (),
12331233
tls: {
12341234
rejectUnauthorized: imapData.smtpIgnoreCertificate,
1235-
ciphers: /outlook\.com$|me\.com$/.test (imapData.smtpServer) ? 'SSLv3' : null
1235+
ciphers: /\.outlook\.com$|\.me\.com$/.test (imapData.smtpServer) ? 'SSLv3' : null
12361236
}
12371237
}
12381238
saveLog ( JSON.stringify ( option ))
@@ -1259,15 +1259,15 @@ export class localServer {
12591259
host: Net.isIP ( imapData.smtpServer ) ? null : imapData.smtpServer,
12601260
hostname: Net.isIP ( imapData.smtpServer ) ? imapData.smtpServer : null,
12611261
port: imapData.smtpPortNumber,
1262-
secure: /outlook\.com$|me\.com$/.test ( imapData.smtpServer ) ? false : imapData.smtpSsl,
1262+
secure: /\.outlook\.com$|\.me\.com$/.test ( imapData.smtpServer ) ? false : imapData.smtpSsl,
12631263
auth: {
12641264
user: imapData.smtpUserName,
12651265
pass: imapData.smtpUserPassword
12661266
},
12671267
connectionTimeout: (1000 * 15).toString (),
12681268
tls: {
12691269
rejectUnauthorized: imapData.smtpIgnoreCertificate,
1270-
ciphers: /outlook\.com$|me\.com$/.test ( imapData.smtpServer ) ? 'SSLv3' : null
1270+
ciphers: /\.outlook\.com$|\.me\.com$/.test ( imapData.smtpServer ) ? 'SSLv3' : null
12711271
}
12721272
}
12731273

0 commit comments

Comments
 (0)