- corretto sendemail password... l'ho cambiata. e ho messo dei controlli

This commit is contained in:
Surya Paolo
2025-07-29 12:53:28 +02:00
parent f26ae170bb
commit 32210bb96a
10 changed files with 1918 additions and 1693 deletions

View File

@@ -106,6 +106,15 @@ module.exports = {
}*/
}
// se non è presente la password, non inviare l'email e manda messaggio di errore !
if (!paramemail.transport.options.auth.pass) {
let email = paramemail.transport.options.auth.user;
console.error('❌ Password mancante ! Impossibile inviare le email. user=', email);
return false;
}
// console.table(paramemail.transport);
// console.log('2 . paramemail.transport', paramemail.transport);
@@ -125,9 +134,13 @@ module.exports = {
},
locals: mylocalsconf,
}).then((ris) => {
if (ris?.response && ris.response.includes('Ok')) {
console.log('✅ Email INVIATA')
}
// console.log('ris EMAIL', ris);
return !!ris;
}).catch((err) => {
console.log('❌ Email NON INVIATA!');
console.error('sendEmail_base Error: ', err);
return false;
});
@@ -754,7 +767,7 @@ module.exports = {
},
getTransport: (mylocalsconf) => {
console.log('getTransport');
// console.log('getTransport');
// Create Transport
let smtpTransport = null;