✉️ Email pusher logs
Co-authored-by: Monta <monta@HP-ProBook-445-14-inch-G9-Notebook-PC-505aadfc.localdomain>
This commit is contained in:
@@ -136,6 +136,7 @@ export default class EmailPusherClass
|
|||||||
} else {
|
} else {
|
||||||
if (this.interface === "smtp") {
|
if (this.interface === "smtp") {
|
||||||
try {
|
try {
|
||||||
|
this.logger.info("sending email via smtp interface.");
|
||||||
const info = await this.transporter.sendMail({
|
const info = await this.transporter.sendMail({
|
||||||
from: `"Sender Name" <${this.sender}>`,
|
from: `"Sender Name" <${this.sender}>`,
|
||||||
to: to,
|
to: to,
|
||||||
@@ -149,6 +150,7 @@ export default class EmailPusherClass
|
|||||||
this.logger.error({ error: `${err}` }, "Failed to send email");
|
this.logger.error({ error: `${err}` }, "Failed to send email");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
this.logger.info("sending email via api interface.");
|
||||||
const { data } = await axios.post<EmailPusherEmailType, EmailPusherResponseType>(
|
const { data } = await axios.post<EmailPusherEmailType, EmailPusherResponseType>(
|
||||||
`${this.apiUrl}`,
|
`${this.apiUrl}`,
|
||||||
emailObject,
|
emailObject,
|
||||||
|
|||||||
Reference in New Issue
Block a user