- corretto sendemail password... l'ho cambiata. e ho messo dei controlli
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user