chore: Always log outgoing emails in development (#8700)

This commit is contained in:
Tom Moor authored and GitHub committed 2025-03-15 18:25:14 +00:00
1 parent 7c41c1360b
commit 619c56102c
1 file changed
+6 -3
+6 -3
View File
@@ -122,11 +122,11 @@ export class Mailer {
sendMail = async (data: SendMailOptions): Promise<void> => {
const { transporter } = this;
if (!transporter) {
Logger.info(
if (env.isDevelopment) {
Logger.debug(
"email",
[
`Attempted to send email but no transport configured.`,
`Sending email:`,
``,
`--------------`,
`From: ${data.from.address}`,
@@ -138,6 +138,9 @@ export class Mailer {
data.text,
].join("\n")
);
}
if (!transporter) {
Logger.warn("No mail transport available");
return;
}