Add env to set smtp
This commit is contained in:
parent
2ae6bef083
commit
4210e52e7e
@ -16,6 +16,10 @@ import {
|
|||||||
MONGO_PORT,
|
MONGO_PORT,
|
||||||
MONGO_USERNAME,
|
MONGO_USERNAME,
|
||||||
PORT,
|
PORT,
|
||||||
|
SMTP_HOST,
|
||||||
|
SMTP_LOGIN,
|
||||||
|
SMTP_PASSWORD,
|
||||||
|
SMTP_PORT,
|
||||||
} from "./config.js";
|
} from "./config.js";
|
||||||
import ADMIN_CREDENTIALS from "./default-admin-credentials.js";
|
import ADMIN_CREDENTIALS from "./default-admin-credentials.js";
|
||||||
import { TheFileManager } from "./file-manager.js";
|
import { TheFileManager } from "./file-manager.js";
|
||||||
@ -94,6 +98,16 @@ export default class TheApp extends App {
|
|||||||
user: "any",
|
user: "any",
|
||||||
password: "any",
|
password: "any",
|
||||||
})
|
})
|
||||||
|
: MAILER === "SMTP"
|
||||||
|
? new SMTPMailer(
|
||||||
|
{
|
||||||
|
host: SMTP_HOST,
|
||||||
|
port: SMTP_PORT,
|
||||||
|
user: SMTP_LOGIN,
|
||||||
|
password: SMTP_PASSWORD,
|
||||||
|
},
|
||||||
|
{ secure: false, requireTLS: true }
|
||||||
|
)
|
||||||
: new LoggerMailer();
|
: new LoggerMailer();
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
|
|||||||
@ -49,3 +49,10 @@ export const UPLOADS_FS_DIR =
|
|||||||
export const MEILISEARCH_MASTER_KEY = process.env.MEILISEARCH_MASTER_KEY || "qwerty";
|
export const MEILISEARCH_MASTER_KEY = process.env.MEILISEARCH_MASTER_KEY || "qwerty";
|
||||||
export const MEILISEARCH_HOST = process.env.MEILISEARCH_HOST || "http://localhost:1098";
|
export const MEILISEARCH_HOST = process.env.MEILISEARCH_HOST || "http://localhost:1098";
|
||||||
export const SCAN_A11Y = false;
|
export const SCAN_A11Y = false;
|
||||||
|
|
||||||
|
export const SMTP_HOST = process.env.SEALIOUS_SMTP_HOST || MAILCATCHER_HOST;
|
||||||
|
export const SMTP_PORT = parseInt(
|
||||||
|
process.env.SEALIOUS_SMTP_PORT || MAILCATCHER_SMTP_PORT.toString()
|
||||||
|
);
|
||||||
|
export const SMTP_LOGIN = process.env.SEALIOUS_SMTP_LOGIN || "";
|
||||||
|
export const SMTP_PASSWORD = process.env.SEALIOUS_SMTP_PASSWORD || "";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user