If you have numerous spaces in Confluence and would like to check for spaces which have a mail setting, you can run a database query like the one below:
select spaces.spacename, spaces.spacekey, bandana.bandanakey from spaces, bandana where spaces.spacekey = bandana.bandanacontext AND bandana.bandanakey="atlassian.confluence.space.mailaccounts";