diff --git a/server/app_cfg.js b/server/app_cfg.js index b879c2e..28dba9e 100644 --- a/server/app_cfg.js +++ b/server/app_cfg.js @@ -42,6 +42,7 @@ app_cfg.rmld = { mailserver_host: 'smtp.xxx.xxx', mailserver_port: 587, secure_mail: false, + unauthorized_mail: false, mail_user: 'testuser', mail_pass: 'testuserpass',//'testpass', mail_from: 'xyz@xxx.xxx'//'keineantwort@wachalarm.info.tm' diff --git a/server/sql_qry.js b/server/sql_qry.js index fc7fef4..ea03a60 100755 --- a/server/sql_qry.js +++ b/server/sql_qry.js @@ -844,7 +844,7 @@ module.exports = function (db, app_cfg) { function db_vmtl_get_list(waip_id, callback) { // Pruefen ob fuer eine Wache im Einsatz ein Verteilerliste hinterlegt ist db.get(`select v.waip_wachenname, v.vmtl_typ, v.vmtl_account_name, v.vmtl_account_group from waip_vmtl v - where v.waip_wachenname = (select distinct w.name_wache waip_wachenname from waip_wachen w left join waip_einsatzmittel em on em.wachenname = w.name_wache + where v.waip_wachenname in (select distinct w.name_wache waip_wachenname from waip_wachen w left join waip_einsatzmittel em on em.wachenname = w.name_wache where em.waip_einsaetze_ID = ?)`, [waip_id], function (err, liste) { if (err == null && liste) { // waip_id zu Daten hinzufuegen diff --git a/server/waip.js b/server/waip.js index 617a250..a15990f 100755 --- a/server/waip.js +++ b/server/waip.js @@ -403,7 +403,6 @@ module.exports = function (io, sql, fs, brk, async, app_cfg) { var validmail = /\S+@\S+\.\S+/; if (validmail.test(export_data.export_recipient)) { // Mail-Server - // BUG Mail wird bei selbst signiertem Zertifikat nicht verschickt var transport = nodemailer.createTransport({ host: app_cfg.rmld.mailserver_host, port: app_cfg.rmld.mailserver_port, @@ -413,7 +412,7 @@ module.exports = function (io, sql, fs, brk, async, app_cfg) { pass: app_cfg.rmld.mail_pass }, tls: { - rejectUnauthorized: false + rejectUnauthorized: app_cfg.rmld.unauthorized_mail } }); var mail_message = {