One of the new features in SCOM 2019 and later is HTML based emails.
This is great – because they are much more attractive and configurable over the previous plain text.
SCOM 2016 and earlier alerts:
Has plain text email like this:
This same email in SCOM 2019 and later:
Looks great right???
Almost.
A big complaint here is that the Alert Description now shows up as one big blob of text, in HTML format. The line breaks are not honored and this is very hard to read.
The cool thing about HTML, is that you have a LOT of control over how things are presented visually, and the SCOM HTML supports CSS controls.
A simple change the in the SCOM Notification Channel from this line:
<b>Alert description:</b> $Data[Default='Not Present']/Context/DataItem/AlertDescription$<br />
To this:
<div style="white-space: pre"><b>Alert description:</b> $Data[Default='Not Present']/Context/DataItem/AlertDescription$<br /></div>
and our emails will format exactly as they are seen in the console:
Hi Kevin,
How we edit email message there for html as it is showing in greyed and not editable.
Thanks
You use the copy button, then copy the entire thing to notepad, make your edits – then copy and use the paste button. You cannot directly edit.
Hi Kevin
We made the changes in our environment (SCOM2019) but the mail format is still “ugly” 🙁 do we have to restart some services or other workarounds?
No – you don’t need to. How odd. Are you should you made changes to the SMTP channel that the subscription is using?
Also – is the alert description “ugly” in the console too?
yes, we only have one SMTP channel.
in the scom-console itself, the description-field looks fine. its only the mail-output that is still broken…
ok, it seems that our local SMTP-server has something to do with. if i configured the SMTP directly to Exchange Online then the format is working….
How do you embed an image in the body of the email?
We’d like to show a company logo.
I used an image located on a shared drive, but if the user opens the email off the network, the image won’t show.