added try catch in email message create