Page 2 of 2
Re: Email Notifications Marked as High Importance
Posted: Tue Jun 30, 2015 2:26 pm
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.
Re: Email Notifications Marked as High Importance
Posted: Tue Jun 30, 2015 2:48 pm
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");
}
Re: Email Notifications Marked as High Importance
Posted: Wed Jul 01, 2015 1:36 pm
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?
Re: Email Notifications Marked as High Importance
Posted: Wed Jul 01, 2015 1:40 pm
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.
Re: Email Notifications Marked as High Importance
Posted: Thu Jul 02, 2015 6:33 am
by jkinning
Thanks. You can close this.