🪵 Added logs to check if secure is enable (#276)
This commit is contained in:
@@ -45,10 +45,6 @@ export default class EmailPusherClass
|
|||||||
port: this.configuration.get<number>("smtp_port", 25),
|
port: this.configuration.get<number>("smtp_port", 25),
|
||||||
requireTLS: this.configuration.get<boolean>("smtp_tls", false),
|
requireTLS: this.configuration.get<boolean>("smtp_tls", false),
|
||||||
secure: this.configuration.get<boolean>("smtp_tls", false),
|
secure: this.configuration.get<boolean>("smtp_tls", false),
|
||||||
auth: {
|
|
||||||
user: this.configuration.get<string>("smtp_user", ""),
|
|
||||||
pass: this.configuration.get<string>("smtp_password", ""),
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
this.transporter = nodemailer.createTransport(smtpConfig);
|
this.transporter = nodemailer.createTransport(smtpConfig);
|
||||||
this.sender = this.configuration.get<string>("smtp_from", "");
|
this.sender = this.configuration.get<string>("smtp_from", "");
|
||||||
@@ -148,7 +144,10 @@ export default class EmailPusherClass
|
|||||||
|
|
||||||
this.logger.info("Message sent: %s", info.response);
|
this.logger.info("Message sent: %s", info.response);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.logger.error({ error: `${err}` }, "Failed to send email");
|
this.logger.error(
|
||||||
|
{ error: `${err}`, secure: this.configuration.get<boolean>("smtp_tls", false) },
|
||||||
|
"Failed to send email",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.logger.info("sending email via api interface.");
|
this.logger.info("sending email via api interface.");
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export type SMTPClientConfigType = {
|
|||||||
port: number;
|
port: number;
|
||||||
secure?: boolean;
|
secure?: boolean;
|
||||||
requireTLS: boolean;
|
requireTLS: boolean;
|
||||||
auth: {
|
auth?: {
|
||||||
user: string;
|
user: string;
|
||||||
pass: string;
|
pass: string;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user