It seems El Capitan 10.11 is a bit buggy. In my case after upgrading to El Capitan ALL my mail accounts and mail filing boxes have gone. It wants me to start afresh. I have 5 POP and 3 imap accounts and loads of Inbox & Outbox files.

After several hours I rectified the problem but it was drastic. Here is what I did:

1 - Went into ~user/Library/Application support/Mail/V3 and copied everything into a Temp folder

2 -  recreated manually all my POP accounts & iCloud account. (decided I did not need my gmail imap accounts as hadn't used them in ages)


3 - Using Time Machine from within mail restored all my 'Received' & 'Sent' filing mailboxes. NOTE: They will be restored under On My Mac, Time Machine, I just dragged them out of Time Machine and dropped them under On My Mac as they where before, after they had been restored.

4 - Mail had recreated a clean folder and file structure within ~user/Library/Application support/Mail/V3 I then moved my Signatures folder from my Temp location. Signatures are found in ~user/Library/Application support/Mail/V3/MailData


5 - Rebuilt all accounts and filing mailboxes


6 - Went through Preferences and reset-up all by previous settings. Though my Signatures were still there I just had to re-associate them to the appropriate accounts.


 We are now good to go


 Strange thing is that the ~user/library/Preferences/  was not  recreated so I do not know where the preference settings are any more. Plus allot of files that were in ~user/Library/Application support/Mail no longer used so I moved those into a Temp folder for the time being. All filed mail is kept in ~user/Library/Application support/Mail/V3/Mailboxes and most of the settings & preferences are kept in ~user/Library/Application support/Mail/V3/MailData with each actual account kept in an alphanumeric folder ~user/Library/Application support/Mail.

Time Machine is your friend and life saver for all those filed/old emails SO USE IT.

Hope this helps