internet accounts missing after upgrade from El Capitan to Catalina
I have carried out an upgrade from El Capitan (10.11.6) to Catalina (10.15.7) and noticed that when I loaded Mail it didn't do the usual "Mail is upgrading database" but presented me with the "Choose a Mail account provider" window.
Then I noticed that there were no email accounts or inboxes shown but the Flagged items showed the number of emails.
Looking in System Preferences Internet accounts there are no accounts setup.
What's the sensible way to get this back working again with all of the emails and accounts setup correctly and keeping the Flagged items?
I have a Time Machine backup I could use to restore back to El Capitan if needed.
Cheers
Mark