Why is the notification email function not working?