add try catch for send mail