Send email and has error handling