Logging sending of emails