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