catch SMTP exceptions when delivering emails