mirror of
https://github.com/Ravinou/borgwarehouse
synced 2026-03-14 14:25:46 +01:00
refactor: ⚡ email template attachement path for typescript build
This commit is contained in:
parent
a62e55b42a
commit
766a63d524
2 changed files with 6 additions and 2 deletions
|
|
@ -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',
|
||||
},
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
},
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue