Updating the email notifications to work according