Page 2 of 2

Re: Specify "Sender Name" in xi_host_notification_handler?

Posted: Mon Jul 13, 2015 3:39 pm
by perric
Hello,

Thanks for your reply. I am using "notify-host-by-email", but it is easy enough for me to switch to xi_host_notification_handler and xi_service_notification_handler.

I will give this a try. So, the emailtype variable would be accessible between PHP scripts.

David

Re: Specify "Sender Name" in xi_host_notification_handler?

Posted: Mon Jul 13, 2015 5:02 pm
by jolson
Let us know if ssax's solution works for you. Thanks!

Re: Specify "Sender Name" in xi_host_notification_handler?

Posted: Mon Jul 20, 2015 1:54 pm
by perric
Ssax,

I like the solution. Thanks. However, it will be an issue for us if I modify a script that could overwritten each time we do an upgrade.

I have come up with another possible approach. Can I use the $CONTACTEMAIL$ variable to add any address that I need, when calling the xi_host_notification_handler (provided my e-mail system will accept it)? I can setup an e-mail for each e-mail address in my e-mail system.

I need this to override the "Send Mail From" field under Mail Settings. Will it override that field or will I need to leave that field blank?

David

Re: Specify "Sender Name" in xi_host_notification_handler?

Posted: Mon Jul 20, 2015 4:43 pm
by ssax
I assumed xi_host_notification_handler because it was in the topic :)

That won't work because the email processing code will replace it when sending with what you have set under Admin > Manage Email Settings, you would still need code modifications that would get replaced during an upgrade.

Re: Specify "Sender Name" in xi_host_notification_handler?

Posted: Mon Jul 20, 2015 4:44 pm
by ssax
I should clarify that the xi_host/service_notification handler really just sends it to the command subsystem to be put into the DB, then the emails get processed from the DB and it uses what you have set under Admin > Manage Email Settings.

Re: Specify "Sender Name" in xi_host_notification_handler?

Posted: Mon Jul 20, 2015 9:31 pm
by perric
Ssax,

Does that mean that "--emailtype="$_SERVICEEMAILTYPE$" " won't work either?

David

Re: Specify "Sender Name" in xi_host_notification_handler?

Posted: Tue Jul 21, 2015 9:45 am
by ssax
It will only work if you make the code changes that I've specified as well.

Re: Specify "Sender Name" in xi_host_notification_handler?

Posted: Tue Aug 18, 2015 2:20 pm
by perric
Hi All,

Thanks for all answers. I would like to close this post.

David