Debug logging for email