email syncing using gmail API with database support