Monterey upgrade from El Capitan mail accounts not working
I've bought a new MacBook air and migrated all my stuff from an old 2009 MacBook Pro running El Capitan (10.11.6)
Everything seems to have come over but Mail isn't recognising the mail accounts. The Mail folder in Library looks like it should, V9 folder with all the subfolders and support files corresponding to the El Cap Mail folder, but Mail wants me to enter passwords for the accounts.
When I did that on one of the accounts, it started downloading 50,000 emails going back several years, so Apple Support told me to do and erase from System Prefs and do the migration again. This gave the same result with the Mail accounts.
I've got a time machine backup of the MBP going back sometime that I did the migration from.
Anyone got any ideas on getting the Mail accounts re-established.
MacBook Air 13″, macOS 12.0