Do you want only one single notification no matter how long nagios is running, no matter if the state changes after the first change?
Or do you want always a single notification every time the state changes. For the latter you can use this configuration for the host or service:
notification_interval 0 ; only one single notification is sent after a state change
max_check_attempts 1 ; no rechecks so that nagios immediately sends a notifcation if state change occurs
In the contact definition use this