update db after sending email