Added support for help request emails (#4489)

This commit is contained in:
Ylian Saint-Hilaire 2022-09-02 17:03:38 -07:00
parent 9738848dc5
commit 4e86b319f7
47 changed files with 2911 additions and 2155 deletions

20
emails/device-help.html Normal file
View File

@ -0,0 +1,20 @@
<div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding=8>
<tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b><br />
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]">click here</a> to navigate to this device.
</p>
</div>

7
emails/device-help.txt Normal file
View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">klikněte zde</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">Klik her</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">hier klicken</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">haz clic aquí</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">klikkaa tästä</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">cliquez ici</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">यहाँ क्लिक करें</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">clicca qui</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">ここをクリック</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">여기를 클릭하십시오.</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">Klik hier</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">kliknij tutaj</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">Clique aqui</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">Clique aqui</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">кликните сюда</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">Klicka här</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">buraya Tıkla</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">点击这里</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -0,0 +1,20 @@
<html><head></head><body><div>[[[SERVERNAME]]] - "[[[DEVICENAME]]]" Help Request</div>
<div style="font-family:Arial,Helvetica,sans-serif">
<table style="background-color:#003366;color:lightgray;width:100%" cellpadding="8">
<tbody><tr>
<td>
<b style="font-size:20px;font-family:Arial,Helvetica,sans-serif">[[[SERVERNAME]]] - Help Request</b>
</td>
</tr>
</tbody></table>
<p>
Device "<b>[[[DEVICENAME]]]</b>" requested help.
</p>
<p>
User: <b>[[[HELPUSERNAME]]]</b>
Request: <b>[[[HELPREQUEST]]]</b>
</p>
<p>
<a href="[[[SERVERURL]]]?viewmode=10&amp;gotonode=[[[NODEID]]]">點擊這裡</a> to navigate to this device.
</p>
</div></body></html>

View File

@ -0,0 +1,7 @@
[[[SERVERNAME]]] - Device Help Request
Device "[[[DEVICENAME]]]" requested assistance.
User: "[[[HELPUSERNAME]]]"
Request: "[[[HELPREQUEST]]]"
[[[SERVERURL]]]?viewmode=10&gotonode=[[[NODEID]]]

View File

@ -1363,6 +1363,16 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
}
if ((typeof command.sessionid == 'string') && (command.sessionid.length < 500)) { event.sessionid = command.sessionid; }
parent.parent.DispatchEvent(targets, obj, event);
// If this is a help request, see if we need to email notify anyone
if (event.msgid == 98) {
// Get the node and change it if needed
db.Get(obj.dbNodeKey, function (err, nodes) { // TODO: THIS IS A BIG RACE CONDITION HERE, WE NEED TO FIX THAT. If this call is made twice at the same time on the same device, data will be missed.
if ((nodes == null) || (nodes.length != 1)) { delete obj.deviceChanging; return; }
const device = nodes[0];
if (typeof device.name == 'string') { parent.parent.NotifyUserOfDeviceHelpRequest(domain, device.meshid, device._id, device.name, command.msgArgs[0], command.msgArgs[1]); }
});
}
}
break;
}

View File

@ -2344,6 +2344,56 @@ function CreateMeshCentralServer(config, args) {
}
}
// See if we need to notifiy any user of device requested help
//if (typeof device.name == 'string') { parent.parent.NotifyUserOfDeviceHelpRequest(domain, device._id, device.meshid, device.name, command.msgArgs[0], command.msgArgs[1]); }
obj.NotifyUserOfDeviceHelpRequest = function (domain, meshid, nodeid, devicename, helpusername, helprequest) {
// Check if there is a email server for this domain
const meshSplit = meshid.split('/');
if (meshSplit.length != 3) return;
const domainId = meshSplit[1];
if (obj.config.domains[domainId] == null) return;
const mailserver = obj.config.domains[domainId].mailserver;
if (mailserver == null) return;
// Get the device group for this device
const mesh = obj.webserver.meshes[meshid];
if ((mesh == null) || (mesh.links == null)) return;
// Get the list of users that have visibility to this device
// This includes users that are part of user groups
const users = [];
for (var i in mesh.links) {
if (i.startsWith('user/') && (users.indexOf(i) < 0)) { users.push(i); }
if (i.startsWith('ugrp/')) {
var usergrp = obj.webserver.userGroups[i];
if (usergrp.links != null) { for (var j in usergrp.links) { if (j.startsWith('user/') && (users.indexOf(j) < 0)) { users.push(j); } } }
}
}
// Check if any user needs email notification
for (var i in users) {
const user = obj.webserver.users[users[i]];
if ((user != null) && (user.email != null) && (user.emailVerified == true)) {
var notify = 0;
// Device group notifications
const meshLinks = user.links[meshid];
if ((meshLinks != null) && (meshLinks.notify != null)) { notify |= meshLinks.notify; }
// User notifications
if (user.notify != null) {
if (user.notify[meshid] != null) { notify |= user.notify[meshid]; }
if (user.notify[nodeid] != null) { notify |= user.notify[nodeid]; }
}
if ((notify & 64) != 0) {
mailserver.sendDeviceHelpMail(domain, user.name, user.email, devicename, nodeid, helpusername, helprequest, user.llang);
}
}
}
}
// Set the connectivity state of a node and setup the server so that messages can be routed correctly.
// meshId: mesh identifier of format mesh/domain/meshidhex
// nodeId: node identifier of format node/domain/nodeidhex

View File

@ -381,8 +381,8 @@ module.exports.CreateMeshMail = function (parent, domain) {
}
// Set all the template replacement options and generate the final email text (both in txt and html formats).
var optionsHtml = { username: username, email: email, servername: domain.title ? domain.title : 'MeshCentral', header: true, footer: false };
var optionsTxt = { username: username, email: email, servername: domain.title ? domain.title : 'MeshCentral', header: true, footer: false };
const optionsHtml = { username: EscapeHtml(username), email: EscapeHtml(email), servername: EscapeHtml(domain.title ? domain.title : 'MeshCentral'), header: true, footer: false };
const optionsTxt = { username: username, email: email, servername: domain.title ? domain.title : 'MeshCentral', header: true, footer: false };
if ((connections == null) || (connections.length == 0)) {
optionsHtml.connections = false;
optionsTxt.connections = false;
@ -410,6 +410,39 @@ module.exports.CreateMeshMail = function (parent, domain) {
});
};
// Send device help request notification mail
obj.sendDeviceHelpMail = function (domain, username, email, devicename, nodeid, helpusername, helprequest, language) {
obj.checkEmail(email, function (checked) {
if (checked) {
parent.debug('email', "Sending device help notification to " + email);
if ((parent.certificates == null) || (parent.certificates.CommonName == null) || (parent.certificates.CommonName.indexOf('.') == -1)) {
parent.debug('email', "Error: Server name not set."); // If the server name is not set, email not possible.
return;
}
var template = getTemplate('device-help', domain, language);
if ((template == null) || (template.htmlSubject == null) || (template.txtSubject == null)) {
parent.debug('email', "Error: Failed to get mail template."); // No email template found
return;
}
// Set all the template replacement options and generate the final email text (both in txt and html formats).
const optionsHtml = { devicename: EscapeHtml(devicename), helpusername: EscapeHtml(helpusername), helprequest: EscapeHtml(helprequest), nodeid: nodeid.split('/')[2], servername: EscapeHtml(domain.title ? domain.title : 'MeshCentral') };
const optionsTxt = { devicename: devicename, helpusername: helpusername, helprequest: helprequest, nodeid: nodeid.split('/')[2], servername: domain.title ? domain.title : 'MeshCentral' };
// Get from field
var from = null;
if (obj.config.sendgrid && (typeof obj.config.sendgrid.from == 'string')) { from = obj.config.sendgrid.from; }
else if (obj.config.smtp && (typeof obj.config.smtp.from == 'string')) { from = obj.config.smtp.from; }
// Send the email
obj.pendingMails.push({ to: email, from: from, subject: mailReplacements(template.htmlSubject, domain, optionsTxt), text: mailReplacements(template.txt, domain, optionsTxt), html: mailReplacements(template.html, domain, optionsHtml) });
sendNextMail();
}
});
};
// Send out the next mail in the pending list
function sendNextMail() {
if ((obj.sendingMail == true) || (obj.pendingMails.length == 0)) { return; }

View File

@ -1709,6 +1709,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
// 8 = WebPage device desktop and serial events
// 16 = Email device connections
// 32 = Email device disconnections
// 64 = Email device help request
var err = null;
try {
@ -1758,6 +1759,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
// 8 = WebPage device desktop and serial events
// 16 = Email device connections
// 32 = Email device disconnections
// 64 = Email device help request
var err = null;
try {

View File

@ -45,12 +45,14 @@ var meshCentralSourceFiles = [
"../emails/account-reset.html",
"../emails/mesh-invite.html",
"../emails/device-notify.html",
"../emails/device-help.html",
"../emails/account-check.txt",
"../emails/account-invite.txt",
"../emails/account-login.txt",
"../emails/account-reset.txt",
"../emails/mesh-invite.txt",
"../emails/device-notify.txt",
"../emails/device-help.txt",
"../emails/sms-messages.txt",
"../agents/agent-translations.json",
"../agents/modules_meshcore/coretranslations.json"

File diff suppressed because it is too large Load Diff

View File

@ -7265,6 +7265,7 @@
if ((features2 & 0x00004000) && (userinfo.emailVerified)) {
if (devNotify & 16) { devNotifyStr.push("Email Connect"); }
if (devNotify & 32) { devNotifyStr.push("Email Disconnect"); }
if (devNotify & 64) { devNotifyStr.push("Email Help Request"); }
}
}
devNotifyStr = devNotifyStr.join(', ');
@ -7693,6 +7694,7 @@
x += '<br /><div style="border-bottom: 1px solid #888;margin-bottom:3px">' + "Email Notifications" + '</div>';
x += '<div><label><input id=p20enotifyIntelDeviceConnect type=checkbox />' + "Device connections" + '</label></div>';
x += '<div><label><input id=p20enotifyIntelDeviceDisconnect type=checkbox />' + "Device disconnections" + '</label></div>';
x += '<div><label><input id=p20enotifyIntelDeviceHelp type=checkbox />' + "Help requests" + '</label></div>';
}
setDialogMode(2, "Notification Settings", 3, p20editDeviceNotifyEx, x, fx);
Q('p20notifyIntelDeviceConnect').checked = (devNotify & 2);
@ -7701,6 +7703,7 @@
if (fx & 1) {
Q('p20enotifyIntelDeviceConnect').checked = (devNotify & 16);
Q('p20enotifyIntelDeviceDisconnect').checked = (devNotify & 32);
Q('p20enotifyIntelDeviceHelp').checked = (devNotify & 64);
}
return false;
}
@ -7713,6 +7716,7 @@
if (fx & 1) {
devNotify += Q('p20enotifyIntelDeviceConnect').checked ? 16 : 0;
devNotify += Q('p20enotifyIntelDeviceDisconnect').checked ? 32 : 0;
devNotify += Q('p20enotifyIntelDeviceHelp').checked ? 64 : 0;
}
meshserver.send({ action: 'changeusernotify', nodeid: currentNode._id, notify: devNotify });
}
@ -12585,6 +12589,7 @@
if ((features2 & 0x00004000) && (userinfo.emailVerified)) {
if (meshNotify & 16) { meshNotifyStr.push("Email Connect"); }
if (meshNotify & 32) { meshNotifyStr.push("Email Disconnect"); }
if (meshNotify & 64) { meshNotifyStr.push("Email Help Request"); }
}
if (meshNotifyStr.length == 0) { meshNotifyStr.push('<i>' + "None" + '</i>'); }
x += addHtmlValue("Notifications", addLink(meshNotifyStr.join(', '), 'p20editMeshNotify()'));
@ -13592,6 +13597,7 @@
x += '<br /><div style="border-bottom: 1px solid #888;margin-bottom:3px">' + "Email Notifications" + '</div>';
x += '<div><label><input id=p20enotifyIntelDeviceConnect type=checkbox />' + "Device connections" + '</label></div>';
x += '<div><label><input id=p20enotifyIntelDeviceDisconnect type=checkbox />' + "Device disconnections" + '</label></div>';
x += '<div><label><input id=p20enotifyIntelDeviceHelp type=checkbox />' + "Help requests" + '</label></div>';
}
setDialogMode(2, "Notification Settings", 3, p20editMeshNotifyEx, x, emailNotify);
Q('p20notifyIntelDeviceConnect').checked = (meshNotify & 2);
@ -13600,6 +13606,7 @@
if (emailNotify) {
Q('p20enotifyIntelDeviceConnect').checked = (meshNotify & 16);
Q('p20enotifyIntelDeviceDisconnect').checked = (meshNotify & 32);
Q('p20enotifyIntelDeviceHelp').checked = (meshNotify & 64);
}
return false;
}
@ -13612,6 +13619,7 @@
if (emailNotify) {
meshNotify += Q('p20enotifyIntelDeviceConnect').checked ? 16 : 0;
meshNotify += Q('p20enotifyIntelDeviceDisconnect').checked ? 32 : 0;
meshNotify += Q('p20enotifyIntelDeviceHelp').checked ? 64 : 0;
}
meshserver.send({ action: 'changemeshnotify', meshid: currentMesh._id, notify: meshNotify });
}