fix: resend mail is not went throught customsmtp

This commit is contained in:
prafull-opensignlabs
2024-09-23 11:53:15 +05:30
parent 3d854756d1
commit f699d93e44
6 changed files with 12 additions and 1 deletions
@@ -315,6 +315,7 @@ export default async function createDocumentWithTemplate(request, response) {
from: sender,
html: html,
extUserId: template.ExtUserPtr.objectId,
mailProvider: template?.ExtUserPtr?.active_mail_adapter || '',
};
sendMail = await axios.post(url, params, { headers: headers });
} catch (error) {
@@ -371,6 +371,7 @@ export default async function createDocumentwithCoordinate(request, response) {
from: sender,
html: html,
extUserId: extUser.id,
mailProvider: parseExtUser?.active_mail_adapter || '',
};
await axios.post(url, params, { headers: headers });
@@ -41,6 +41,7 @@ export default async function resendMail(request, response) {
if (resDoc) {
const _resDoc = resDoc.toJSON();
const contact = _resDoc.Signers.find(x => x.Email === userMail);
const activeMailAdapter = _resDoc?.ExtUserPtr?.active_mail_adapter || '';
if (contact) {
try {
const imgPng = 'https://qikinnovation.ams3.digitaloceanspaces.com/logo.png';
@@ -131,6 +132,7 @@ export default async function resendMail(request, response) {
from: sender,
html: html,
extUserId: _resDoc.ExtUserPtr.objectId,
mailProvider: activeMailAdapter,
};
const res = await axios.post(url, params, { headers: headers });