refactor: email template attachement path for typescript build

This commit is contained in:
Ravinou 2025-04-20 11:27:18 +02:00
commit 766a63d524
No known key found for this signature in database
GPG key ID: EEEE670C40F6A4D7
2 changed files with 6 additions and 2 deletions

View file

@ -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',
},
],

View file

@ -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',
},
],