✉️ Email pusher logs

Co-authored-by: Monta <monta@HP-ProBook-445-14-inch-G9-Notebook-PC-505aadfc.localdomain>
This commit is contained in:
Montassar Ghanmy
2023-11-21 12:16:48 +01:00
committed by GitHub
parent 3bc4aa1d05
commit 19f0202b4e
@@ -136,6 +136,7 @@ export default class EmailPusherClass
} else {
if (this.interface === "smtp") {
try {
this.logger.info("sending email via smtp interface.");
const info = await this.transporter.sendMail({
from: `"Sender Name" <${this.sender}>`,
to: to,
@@ -149,6 +150,7 @@ export default class EmailPusherClass
this.logger.error({ error: `${err}` }, "Failed to send email");
}
} else {
this.logger.info("sending email via api interface.");
const { data } = await axios.post<EmailPusherEmailType, EmailPusherResponseType>(
`${this.apiUrl}`,
emailObject,