diff --git a/.env.local_dev b/.env.local_dev index dc3d04fd21..1f01f75396 100644 --- a/.env.local_dev +++ b/.env.local_dev @@ -49,7 +49,7 @@ SMTP_HOST=smtp.yourhost.com SMTP_PORT=443 SMTP_USER_EMAIL=mailer@yourdomain.com SMTP_PASS=password # if your password includes spaces then write password in single quotes ('asdf pasd asdf bgds'). - +SMTP_TLS=true # if need uncrypted smtp set to to false it disable starttls in smtp # Base64 encoded PFX or p12 document signing certificate file ********************************************************************************************************************* PFX_BASE64='MIIKCQIBAzCCCc8GCSqGSIb3DQEHAaCCCcAEggm8MIIJuDCCBG8GCSqGSIb3DQEH diff --git a/apps/OpenSignServer/cloud/parsefunction/sendMailWithAttachment.js b/apps/OpenSignServer/cloud/parsefunction/sendMailWithAttachment.js index 368b5d9f0d..7851209d8d 100644 --- a/apps/OpenSignServer/cloud/parsefunction/sendMailWithAttachment.js +++ b/apps/OpenSignServer/cloud/parsefunction/sendMailWithAttachment.js @@ -30,6 +30,7 @@ async function sendMailProvider(params) { host: process.env.SMTP_HOST, port: process.env.SMTP_PORT || 465, secure: smtpsecure, + ingnoreTLS: !process.env.SMTP_TLS | false, }; // ✅ Add auth only if BOTH username & password exist diff --git a/apps/OpenSignServer/cloud/parsefunction/sendMailv3.js b/apps/OpenSignServer/cloud/parsefunction/sendMailv3.js index b3aff26af3..790cd5c102 100644 --- a/apps/OpenSignServer/cloud/parsefunction/sendMailv3.js +++ b/apps/OpenSignServer/cloud/parsefunction/sendMailv3.js @@ -17,6 +17,7 @@ async function sendMailProvider(req) { host: process.env.SMTP_HOST, port: process.env.SMTP_PORT || 465, secure: smtpsecure, + ingnoreTLS: !process.env.SMTP_TLS || false, }; // ✅ Add auth only if BOTH username & password exist diff --git a/apps/OpenSignServer/cloud/parsefunction/sendSystemMail.js b/apps/OpenSignServer/cloud/parsefunction/sendSystemMail.js index ed1d6bfa79..993e05beaa 100644 --- a/apps/OpenSignServer/cloud/parsefunction/sendSystemMail.js +++ b/apps/OpenSignServer/cloud/parsefunction/sendSystemMail.js @@ -17,6 +17,7 @@ async function sendMailProvider(req) { host: process.env.SMTP_HOST, port: process.env.SMTP_PORT || 465, secure: smtpsecure, + ingnoreTLS: !process.env.SMTP_TLS | false, }; // ✅ Add auth only if BOTH username & password exist diff --git a/apps/OpenSignServer/index.js b/apps/OpenSignServer/index.js index a2c63310ae..7a2cca3ca8 100644 --- a/apps/OpenSignServer/index.js +++ b/apps/OpenSignServer/index.js @@ -67,6 +67,7 @@ if (smtpenable) { host: process.env.SMTP_HOST, port: process.env.SMTP_PORT || 465, secure: smtpsecure, + ignoreTLS: !process.env.SMTP_TLS || false, }; // ✅ Add auth only if BOTH username & password exist