to save emails to db