Catch and log SMTP errors