What does System Preferences > iCloud > Mail do? Suppose I turn on the setting for Mail in the iCloud preferences pane.  What does this actually do?  I've never turned this on; I have a vague memory that I once did, and that bad/weird things happened with my mail (messages getting synced in ways that I didn't want or something).  But it's so long ago that I no longer remember, and now I'm wondering if I should just get over it and turn it on.

If this syncs the details of my mail accounts across my OS X / iOS devices, that'd be nice.  Does it do anything else?
This is the iCloud Mail service. Turning it on provides the iCloud mail account for Mail.app to use, nothing more. It is basically an automated method of entering the iCloud mail server information into Mail.app to configure your @icloud.com email account, per this Apple KB article:


iCloud: Mail server information


It does not sync other accounts in any way - settings or emails of other accounts are not affected by this setting, just your @icloud.com or @me.com account.



You can read more about iCloud Mail at this Apple KB article:


iCloud: Mail overview