update files for the email notification functionality
add email notification func