try { //code to send email } catch (SmtpException ex) { //log exception or throw to upper layer as per your requirement } catch (Exception ex) //This will handle errors other than thrown feature other than SMTP { //log exception or throw to upper layer as per your requirement }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)