-
Change Request
-
Resolution: Unresolved
-
Medium
-
None
-
6.0.9, 6.2.3
-
None
It seems that there isn't way how to sent an e-mail using SMTP directly by JavaScript webhook (or maybe it is, but just not more explicitly documented?):
https://duktape.org/guide.html
It would be great, if it would be supported in ZBX somehow, as it could overcome another limitation of external alert scripts, as webhook directly supports much wider range of input system macros (e.g. {EVENT.TAGS.<tag name>}), while media type script supports only {ALERT.*} ones:
https://www.zabbix.com/documentation/current/en/manual/config/notifications/media/webhook
https://www.zabbix.com/documentation/current/en/manual/config/notifications/media/script
while only workarounds by parsing of e-mail subject/body seem possible:
https://support.zabbix.com/browse/ZBXNEXT-3185
https://support.zabbix.com/browse/ZBX-12370
Maybe enabling using of sockets would be enough, not just for sending e-mails via SMTP, but also for using variety of other protocols from webhooks, maybe something like?:
https://zetcode.com/javascript/socket/
https://extendscript.docsforadobe.dev/external-communication/socket-object.html
Here is also mentioned some hyphotetical Socket object:
https://wiki.duktape.org/howtofinalization
Thanks in advance for any response.