From 86a2975b3c645b2532aa9db84c720852b168d8f8 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Wed, 9 Oct 2024 15:06:49 +0530 Subject: [PATCH] fix: url is not define --- apps/OpenSignServer/cloud/parsefunction/sendMailv3.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/OpenSignServer/cloud/parsefunction/sendMailv3.js b/apps/OpenSignServer/cloud/parsefunction/sendMailv3.js index 6ac5f7516..fc3aab26b 100644 --- a/apps/OpenSignServer/cloud/parsefunction/sendMailv3.js +++ b/apps/OpenSignServer/cloud/parsefunction/sendMailv3.js @@ -33,7 +33,7 @@ async function sendMailProvider(req, plan, monthchange) { let Pdf = fs.createWriteStream('test.pdf'); const writeToLocalDisk = () => { return new Promise((resolve, reject) => { - const isSecure = new URL(url)?.protocol === 'https:'; + const isSecure = new URL(req.params.url)?.protocol === 'https:'; if (useLocal !== 'true' || isSecure) { https.get(req.params.url, async function (response) { response.pipe(Pdf); @@ -200,7 +200,7 @@ async function sendcustomsmtp(extRes, req) { let Pdf = fs.createWriteStream('test.pdf'); const writeToLocalDisk = () => { return new Promise((resolve, reject) => { - const isSecure = new URL(url)?.protocol === 'https:'; + const isSecure = new URL(req.params.url)?.protocol === 'https:'; if (useLocal !== 'true' || isSecure) { https.get(req.params.url, async function (response) { response.pipe(Pdf);