Email Notifications Marked as High Importance

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Email Notifications Marked as High Importance

Post by jkinning »

That didn't work. I don't have any ! in any of the email messages. If I add PROBLEM back it includes ! to all email messages. I was hoping this isn't an all or nothing but looking that way.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Email Notifications Marked as High Importance

Post by ssax »

Try this:

Code: Select all

if (isset($opts["type"]) && $opts["type"] == "PROBLEM" && strpos($opts['subject'], 'CRITICAL')) {
        // For most clients expecting the Priority header:
        // 1 = High, 2 = Medium, 3 = Low
        $mail->Priority = 1;
        // MS Outlook custom header
        // May set to "Urgent" or "Highest" rather than "High"
        $mail->AddCustomHeader("X-MSMail-Priority: High");
        // Not sure if Priority will also set the Importance header:
        $mail->AddCustomHeader("Importance: High");
    }
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Email Notifications Marked as High Importance

Post by jkinning »

Excellent! That appears to have done the trick. Will this stay in place on any Nagios XI updates or will I need to document this change for updates?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Email Notifications Marked as High Importance

Post by tmcdonald »

It will be overwritten, but if the next release has the official dev changes in then it shouldn't matter. I would doc it just in case though.
Former Nagios employee
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Email Notifications Marked as High Importance

Post by jkinning »

Thanks. You can close this.
Locked