fix(email): Adding full email assets path
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user