Log emails to the database, to better diagnose email problems