Log email in database in case of email problems.