handle error in sending e-mail