Add logging to send_mail