import path from 'path'; export default function emailTest(mailTo: string, username: string) { const template = { from: 'BorgWarehouse' + '<' + process.env.MAIL_SMTP_FROM + '>', to: mailTo, subject: 'Testing email settings', text: 'If you received this email then the mail configuration seems to be correct.', html: `
BorgWarehouse
valid icon

Good job, ` + username + `!

If you received this mail then the configuration seems to be correct.

`, attachments: [ { path: path.join(process.cwd(), 'helpers/templates/attachments/valid-icon.png'), cid: 'valid-icon', }, ], }; return template; }