diff --git a/apps/OpenSignServer/Utils.js b/apps/OpenSignServer/Utils.js index 69fc77b84..a721fff43 100644 --- a/apps/OpenSignServer/Utils.js +++ b/apps/OpenSignServer/Utils.js @@ -2,6 +2,7 @@ import dotenv from 'dotenv'; dotenv.config(); export const cloudServerUrl = 'http://localhost:8080/app'; +export const appName = process.env.APP_NAME || 'OpenSign™'; export function customAPIurl() { const url = new URL(cloudServerUrl); return url.pathname === '/api/app' ? url.origin + '/api' : url.origin; diff --git a/apps/OpenSignServer/cloud/parsefunction/SendMailOTPv1.js b/apps/OpenSignServer/cloud/parsefunction/SendMailOTPv1.js index e400fdf58..3de9b0c2d 100644 --- a/apps/OpenSignServer/cloud/parsefunction/SendMailOTPv1.js +++ b/apps/OpenSignServer/cloud/parsefunction/SendMailOTPv1.js @@ -1,4 +1,4 @@ -import { smtpenable, updateMailCount } from '../../Utils.js'; +import { appName, smtpenable, updateMailCount } from '../../Utils.js'; async function getDocument(docId) { try { const query = new Parse.Query('contracts_Document'); @@ -28,12 +28,12 @@ async function sendMailOTPv1(request) { const mailsender = smtpenable ? process.env.SMTP_USER_EMAIL : process.env.MAILGUN_SENDER; try { await Parse.Cloud.sendEmail({ - from: 'Opensign™' + ' <' + mailsender + '>', + from: appName + ' <' + mailsender + '>', recipient: recipient, - subject: 'Your OpenSign™ OTP', + subject: `Your ${appName} OTP`, text: 'This email is a test.', html: - "
OTP Verification
Your OTP for OpenSign™ verification is:
" + + `
OTP Verification
Your OTP for ${appName} verification is:
` + code + '