improvements

error handling
email sending