Skip to content

Commit 6820873

Browse files
committed
feat: add email debug for staging
1 parent 7e7c619 commit 6820873

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

back/extensions/email/services/email.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const sendEmail = async (
3636
return console.log("Template not found", "id", template.templateId);
3737
}
3838

39+
const emailsDebug = process.env.EMAIL_TEST ? ' - Original emails : ' + options.to : '';
3940

4041
await strapi.plugins["email-designer"].services.email
4142
.sendTemplatedEmail(
@@ -46,7 +47,7 @@ const sendEmail = async (
4647
},
4748
{
4849
signature: isAdmin ? signatureAdmin : signature,
49-
footer: data.user_type ? getFooter(data.user_type) : "",
50+
footer: data.user_type ? getFooter(data.user_type) + emailsDebug : emailsDebug,
5051
url_site: process.env.FRONT_URL,
5152
...data,
5253
}

0 commit comments

Comments
 (0)