sendEmail perl script problem

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

sendEmail perl script problem

Postby sandyspatil » Thu Mar 10, 2011 1:23 am

Hi All,
I am using as a mail sender. I defined following commands for notification handler in commands.cfg ->
define command nd {
command_name notify-host-by-email
command_line /usr/local/bin/sendEmail -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n"

define command {
command_name notify-service-by-email
command_line /usr/local/bin/sendEmail -f $USER5$ -l /var/log/sendEmail -u "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -m "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$"

But the problem is I am not getting line breaks in my Emails. Instead of getting new line I got "n" in my mails. Can U help me in this so I will get well formatted Emails with line breaks.
Posts: 15
Joined: Tue Dec 07, 2010 6:31 am

Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 13 guests