Add env to set smtp
This commit is contained in:
parent
2ae6bef083
commit
4210e52e7e
@ -16,6 +16,10 @@ import {
|
||||
MONGO_PORT,
|
||||
MONGO_USERNAME,
|
||||
PORT,
|
||||
SMTP_HOST,
|
||||
SMTP_LOGIN,
|
||||
SMTP_PASSWORD,
|
||||
SMTP_PORT,
|
||||
} from "./config.js";
|
||||
import ADMIN_CREDENTIALS from "./default-admin-credentials.js";
|
||||
import { TheFileManager } from "./file-manager.js";
|
||||
@ -94,7 +98,17 @@ export default class TheApp extends App {
|
||||
user: "any",
|
||||
password: "any",
|
||||
})
|
||||
: new LoggerMailer();
|
||||
: MAILER === "SMTP"
|
||||
? new SMTPMailer(
|
||||
{
|
||||
host: SMTP_HOST,
|
||||
port: SMTP_PORT,
|
||||
user: SMTP_LOGIN,
|
||||
password: SMTP_PASSWORD,
|
||||
},
|
||||
{ secure: false, requireTLS: true }
|
||||
)
|
||||
: new LoggerMailer();
|
||||
|
||||
async start() {
|
||||
await super.start();
|
||||
|
||||
@ -49,3 +49,10 @@ export const UPLOADS_FS_DIR =
|
||||
export const MEILISEARCH_MASTER_KEY = process.env.MEILISEARCH_MASTER_KEY || "qwerty";
|
||||
export const MEILISEARCH_HOST = process.env.MEILISEARCH_HOST || "http://localhost:1098";
|
||||
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