added try catch to sendEmail block to just log error and let the rest go through