Nagios alerts config

Hi,
I have trying to get my nagios alerts sorted out but i keep get blank anyway here is what i want to do.
config

define command{
command_name notify-service-by-mail
command_line /usr/bin/printf “%b” “***** Nagios ***\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info: $HOSTNOTES$\n\n$SERVICEOUTPUT$\n\nURL: $HOSTNOTESURL$" | /bin/mail -s " $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **” $CONTACTEMAIL$
}
the part highlighted in red i need it to show when an email is send out but it doesnt.
here is the resource.cfg

$HOSTNOTESURL:notes_url$
$HOSTNOTES:notes$

and the serviceextinfo.cfg

define serviceextinfo {
host_name slave1
service_description Mysql - Is IO Replication Running
notes This is a slave to cluster1/2 master
notes_url wiki.com
}
and the
office.cfg
define service{
use generic-service
host_name slave1
service_description Mysql - Is IO Replication Running
check_command check_nrpe!check_mysql_repl_io
}

and the email look like this
***** Nagios *****

Notification Type: PROBLEM

Service: Mysql - Replication Delay Slave behind Master
Host: slave8
Address: 192.168.1.8
State: CRITICAL

Date/Time: Wed Oct 6 15:44:47 BST 2010

Additional Info:

CRITICAL: Could not connect to MySQL

URL:

Can someone please explain how i can get this to work, i have been on google for ages with no luck.
thanks