modified sendnotifications.php