[ZBXNEXT-517] Mail text as plain/HTML, only on demand Created: 2010 Sep 22 Updated: 2024 Apr 10 Resolved: 2019 Mar 20 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Frontend (F), Server (S) |
Affects Version/s: | 1.8.2 |
Fix Version/s: | 4.2.0alpha1, 4.2 (plan) |
Type: | Change Request | Priority: | Minor |
Reporter: | Anthony | Assignee: | Michael Veksler |
Resolution: | Fixed | Votes: | 42 |
Labels: | alerts, email, html, usability | ||
Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
Environment: |
Zabbix 1.8.2 (FreeBSD port) |
Attachments: |
![]() |
||||||||||||
Issue Links: |
|
||||||||||||
Sub-Tasks: |
|
||||||||||||
Team: | |||||||||||||
Sprint: | Sprint 45, Sprint 46, Nov 2018, Sprint 50 (Mar 2019) | ||||||||||||
Story Points: | 1 |
Description |
Need one small but useful improvement. Looking for posibility of sending email messages in a "plain/html" format. Description: if a text email message begins with the tag <html>, this tag does not appear, but such a letter should be treated as html code. And in this message should be processed all occurrences of the html tags. |
Comments |
Comment by Anthony [ 2010 Sep 22 ] |
need an expandable scheme with posibility to add and use original HTML tags (if needed), like: <b></b> |
Comment by Anthony [ 2010 Nov 25 ] |
Additional information: NO <br> tags are required for text formatting. Need only put <pre> tag BEFORE of message and </pre> AFTER. This completely saves all linebreaks. |
Comment by Robert Hau [ 2011 Aug 31 ] |
Having HTML Email capability would be great. I have wanted to enable automatic emails to be sent to our clients, but we required it to be formated properly. |
Comment by romale [ 2013 Oct 07 ] |
for example, in action should be parameter something: "INSERT HTML CODE" or "HTML CODE". After, we can create html message in LibreOffice, insert zabbix macros keys and paste this html source to action. |
Comment by Oleksii Zagorskyi [ 2015 Apr 27 ] |
It could also help to workaround a specific Outlook behavior (removing line breaks in plain text mail by default). |
Comment by Vitaly Zhuravlev [ 2016 Sep 19 ] |
As a workaround: I've been constantly changing one single line in src/libs/zbxmedia/email.c tmp = zbx_dsprintf(tmp, "From: %s%s\r\n" "To: %s%s\r\n" "Date: %s\r\n" "Subject: %s\r\n" "MIME-Version: 1.0\r\n" "Content-Type: text/plain; charset=\"UTF-8\"\r\n" "Content-Transfer-Encoding: base64\r\n" "\r\n" "%s", NULL != from_display_name ? from_display_name : "", from_angle_addr, NULL != to_display_name ? to_display_name: "", to_angle_addr, str_time, localsubject, localbody); to tmp = zbx_dsprintf(tmp, "From: %s%s\r\n" "To: %s%s\r\n" "Date: %s\r\n" "Subject: %s\r\n" "MIME-Version: 1.0\r\n" "Content-Type: text/html; charset=\"UTF-8\"\r\n" "Content-Transfer-Encoding: base64\r\n" "\r\n" "%s", NULL != from_display_name ? from_display_name : "", from_angle_addr, NULL != to_display_name ? to_display_name: "", to_angle_addr, str_time, localsubject, localbody); This actually allowed me to color-code problems with RED against GREEN for recoveries And that didn't break my plain text alerts (for SMS for instance) if I wanted to use them at the same time. And IMHO, text/html could be a default for Zabbix without any serious consequences. |
Comment by Alexey Korepov [ 2017 Feb 17 ] |
Before this issue is solved - here we can find some workarounds for this problem via external scripts: |
Comment by Michael Veksler [ 2018 Nov 27 ] |
Available in 4.2.0alpha1 (trunk) r87279. |