mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 08:47:13 +08:00
Merge branch 'master' into community-pagination-
This commit is contained in:
@@ -163,7 +163,7 @@ const CONFIG = {
|
||||
SMTP_FROM_ADDRESS: process.env.TALK_SMTP_FROM_ADDRESS,
|
||||
SMTP_HOST: process.env.TALK_SMTP_HOST,
|
||||
SMTP_PASSWORD: process.env.TALK_SMTP_PASSWORD,
|
||||
SMTP_PORT: process.env.TALK_SMTP_PORT,
|
||||
SMTP_PORT: process.env.TALK_SMTP_PORT ? parseInt(process.env.TALK_SMTP_PORT) : undefined,
|
||||
SMTP_USERNAME: process.env.TALK_SMTP_USERNAME,
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+5
-1
@@ -64,7 +64,11 @@ const options = {
|
||||
};
|
||||
|
||||
if (SMTP_PORT) {
|
||||
options.port = SMTP_PORT;
|
||||
try {
|
||||
options.port = parseInt(SMTP_PORT);
|
||||
} catch (e) {
|
||||
throw new Error('TALK_SMTP_PORT is not an integer');
|
||||
}
|
||||
} else {
|
||||
options.port = 25;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user