added try clauses to email building