diff --git a/helpers/templates/emailAlertStatus.ts b/helpers/templates/emailAlertStatus.ts index e1dbee4..c064d72 100644 --- a/helpers/templates/emailAlertStatus.ts +++ b/helpers/templates/emailAlertStatus.ts @@ -1,3 +1,5 @@ +import path from 'path'; + export default function emailTest(mailTo: string, username: string, aliasList: string[]) { const aliasTemplate = (x: string[]) => { let str = ''; @@ -126,7 +128,7 @@ export default function emailTest(mailTo: string, username: string, aliasList: s `, attachments: [ { - path: 'helpers/templates/attachments/alert-icon.png', + path: path.join(process.cwd(), 'helpers/templates/attachments/alert-icon.png'), cid: 'alert-icon', }, ], diff --git a/helpers/templates/emailTest.ts b/helpers/templates/emailTest.ts index 7faff0a..db8c3d5 100644 --- a/helpers/templates/emailTest.ts +++ b/helpers/templates/emailTest.ts @@ -1,3 +1,5 @@ +import path from 'path'; + export default function emailTest(mailTo: string, username: string) { const template = { from: 'BorgWarehouse' + '<' + process.env.MAIL_SMTP_FROM + '>', @@ -94,7 +96,7 @@ export default function emailTest(mailTo: string, username: string) { `, attachments: [ { - path: 'helpers/templates/attachments/valid-icon.png', + path: path.join(process.cwd(), 'helpers/templates/attachments/valid-icon.png'), cid: 'valid-icon', }, ],