mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 08:48:15 +03:00
Add an email logger and an email debug confjson5 param.
This commit is contained in:
@@ -12,9 +12,14 @@ if (ServerConfig.EMAIL_CONFIG) {
|
||||
|
||||
try {
|
||||
transporter = nodemailer.createTransport({
|
||||
// @ts-expect-error There's a bug in nodemailers types
|
||||
// where it thinks that sendmail cannot be true while
|
||||
// debug or logging are enabled.
|
||||
sendmail: true,
|
||||
newline: "unix",
|
||||
path: conf.SENDMAIL_BIN ?? "/usr/bin/sendmail",
|
||||
debug: !!ServerConfig.EMAIL_CONFIG?.DEBUG,
|
||||
logger: CreateLogCtx("email-server"),
|
||||
});
|
||||
|
||||
transporter.verify((err) => {
|
||||
|
||||
@@ -71,6 +71,7 @@ export interface TachiConfig {
|
||||
FROM: string;
|
||||
SENDMAIL_BIN?: string;
|
||||
DKIM?: SendMailOptions["dkim"];
|
||||
DEBUG?: boolean;
|
||||
};
|
||||
USC_QUEUE_SIZE: integer;
|
||||
BEATORAJA_QUEUE_SIZE: integer;
|
||||
@@ -116,6 +117,7 @@ const err = p(config, {
|
||||
FROM: "string",
|
||||
SENDMAIL_BIN: "*string",
|
||||
DKIM: "*object",
|
||||
DEBUG: "*boolean",
|
||||
}),
|
||||
USC_QUEUE_SIZE: p.optional(p.gteInt(2)),
|
||||
BEATORAJA_QUEUE_SIZE: p.optional(p.gteInt(2)),
|
||||
|
||||
Reference in New Issue
Block a user