catch exception if cannot send mail