modified sendNotification function to send notification to list of recipients