What happened to my mail folders after downloading El Capitan?!

Just so you know...your post from last year is still helping people. My mailboxes disappeared, and I googled for an answer...and got yours. It worked like a charm. Thank you.
This doesn't work for me. My IMAP accounts are there, the POP accounts are not.

Original thread: https://forums.imore.com/threads/what-happened-to-my-mail-folders-after-downloading-el-capitan.343059/