fix(email): Adding full email assets path

This commit is contained in:
Josepablo C
2025-03-02 22:44:04 -06:00
parent e4d8f7bb3e
commit 71790b10ef

View File

@@ -1,4 +1,5 @@
'user strict';
const { ROOT_PATH, HANDLERS_PATH } = process.env;
const nodemailer = require("nodemailer");
const apiConfig = require( '../../../config/apiConfig.json' );
@@ -42,7 +43,7 @@ async function sendMailTemplate( receiver, subject, html ){
html,
attachments:[{
filename: 'eta_logo.png',
path: './StandAlone/assets/eta_logo.png',
path: `${ROOT_PATH}/${HANDLERS_PATH}/MailClient/StandAlone/assets/eta_logo.png`,
cid: 'eta_logo'
}]
});
@@ -82,8 +83,8 @@ async function AccountPwdResetEmail( receiver, content ){
async function ContactEmail( receiver, content ){
const subject = "[ETA] Contact Email";
const { user_name } = content;
const html = contactResponseTemplate( user_name );
const { name } = content;
const html = contactResponseTemplate( name );
return await sendMailTemplate( receiver, subject, html );
}