- fix link bot for Test Envinroment
- If invite not exist, error message - Username (where name and surname don't exists).
This commit is contained in:
@@ -203,7 +203,9 @@ module.exports = {
|
||||
|
||||
await telegrambot.notifyToTelegram(telegrambot.phase.REGISTRATION, mylocalsconf);
|
||||
|
||||
tools.sendNotifToAdmin('Nuova Registrazione Utente: ' + mylocalsconf.name + ' ' + mylocalsconf.surname + ' (' + mylocalsconf.username + ')');
|
||||
const nometot = tools.getNomeCognomeEUserNameByUser(mylocalsconf);
|
||||
|
||||
tools.sendNotifToAdmin('Nuova Registrazione Utente: ' + nometot);
|
||||
|
||||
// if (tools.isManagAndAdminDifferent(idapp)) {
|
||||
// this.sendEmail_base('admin/registration/' + tools.LANGADMIN, tools.getManagerEmailByIdApp(idapp), mylocalsconf, '');
|
||||
@@ -235,7 +237,7 @@ module.exports = {
|
||||
|
||||
await telegrambot.notifyIscrizioneToTelegram(telegrambot.phase.ISCRIZIONE_CONACREIS, mylocalsconf);
|
||||
|
||||
tools.sendNotifToAdmin('Iscrizione Conacreis : ' + mylocalsconf.name + ' ' + mylocalsconf.surname);
|
||||
tools.sendNotifToAdmin('Iscrizione Conacreis : ' + mylocalsconf.name + ' ' + mylocalsconf.surname + ' (' + mylocalsconf.username + ')');
|
||||
|
||||
if (tools.isManagAndAdminDifferent(idapp)) {
|
||||
this.sendEmail_base('admin/iscrizione_conacreis/' + tools.LANGADMIN, tools.getManagerEmailByIdApp(idapp), mylocalsconf, '');
|
||||
@@ -311,7 +313,7 @@ module.exports = {
|
||||
preparaConfPerBooking: async function (res, idapp, mylocalsconf, recbooking, title) {
|
||||
|
||||
let texthtml = '';
|
||||
let msgtelegram = title + ' Evento [' + mylocalsconf.name + ' ' + mylocalsconf.surname + '] ' + mylocalsconf.eventtextplain;
|
||||
let msgtelegram = title + ' Evento [' + mylocalsconf.username + ' (' + mylocalsconf.name + ' ' + mylocalsconf.surname + ')] ' + mylocalsconf.eventtextplain;
|
||||
if (recbooking.modified) {
|
||||
msgtelegram += ' (modificato) '
|
||||
} else {
|
||||
@@ -368,7 +370,7 @@ module.exports = {
|
||||
|
||||
mylocalsconf = await this.preparaConfPerBooking(res, idapp, mylocalsconf, recbooking, 'Cancellazione');
|
||||
|
||||
let msgtelegram = 'Cancellazione Evento [' + mylocalsconf.name + ' ' + mylocalsconf.surname + '] ' + mylocalsconf.eventtextplain;
|
||||
let msgtelegram = 'Cancellazione Evento [' + mylocalsconf.name + ' (' + mylocalsconf.name + ' ' + mylocalsconf.surname + ')] ' + mylocalsconf.eventtextplain;
|
||||
|
||||
telegrambot.sendMsgTelegramToTheManagers(idapp, msgtelegram);
|
||||
|
||||
@@ -543,6 +545,7 @@ module.exports = {
|
||||
|
||||
let out = myvar.replace('{urlunsubscribe}', urlunsibscribe);
|
||||
out = out.replace('{email}', mylocalsconf.emailto);
|
||||
out = out.replace('{username}', mylocalsconf.username);
|
||||
out = out.replace('{name}', mylocalsconf.name ? mylocalsconf.name : mylocalsconf.username);
|
||||
out = out.replace('{surname}', mylocalsconf.surname ? mylocalsconf.surname : '');
|
||||
|
||||
@@ -598,15 +601,17 @@ module.exports = {
|
||||
// Create Transport
|
||||
let smtpTransport = null;
|
||||
|
||||
// console.log('mylocalsconf.dataemail', mylocalsconf.dataemail);
|
||||
|
||||
if (mylocalsconf.dataemail.email_service !== 'gmail' && mylocalsconf.dataemail.email_service !== undefined && mylocalsconf.dataemail.email_service !== "") {
|
||||
smtpTransport = nodemailer.createTransport({
|
||||
host: mylocalsconf.dataemail.email_service,
|
||||
port: mylocalsconf.dataemail.email_port,
|
||||
secureConnection: false,
|
||||
secureConnection: true,
|
||||
tls: { cipher: 'SSLv3' },
|
||||
auth: {
|
||||
user: mylocalsconf.dataemail.from,
|
||||
pass: mylocalsconf.dataemail.pwd_from
|
||||
pass: tools.decryptdata(mylocalsconf.dataemail.pwd_from)
|
||||
}
|
||||
});
|
||||
} else if (mylocalsconf.dataemail.email_service === 'gmail' && !!mylocalsconf.dataemail.pwd_from) {
|
||||
@@ -616,7 +621,7 @@ module.exports = {
|
||||
service: 'gmail', //'Gmail',
|
||||
auth: {
|
||||
user: mylocalsconf.dataemail.from,
|
||||
pass: mylocalsconf.dataemail.pwd_from
|
||||
pass: tools.decryptdata(mylocalsconf.dataemail.pwd_from)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -630,6 +635,8 @@ module.exports = {
|
||||
});
|
||||
}
|
||||
|
||||
// console.log('smtpTransport', smtpTransport);
|
||||
|
||||
return smtpTransport;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user