The hidden ~/Library/ folder also contains the Apple Mail inbox and settings. Start by copying across ~/Library/Mail and ~/Library/Mail Downloads, then dip into ~Library/Preferences and grab all the .plist files with "Mail" in the name. These days MacOS runs Apple Mail in a sandbox, so you should check for ~/Library/Containers/com.apple.mail and copy it across as well.
When I fired up Apple Mail everything was just where it should be and all I had to do was re-enter my password. This was using IMAP and a few Archive folders, but I don't use Apple's iCloud email so I can't vouch for it. If you trawl through the ~/Library folder you'll find other references to Mail, such as in ~/Library/Application Scripts and ~/Library/Application Support. My migration went smoothly without them, but if you run into trouble or you're missing anything they might help.
If your first attempt fails and Apple Mail on your new Mac wants to set up everything from scratch, once again you might have missed a preferences file. Close the application, delete all the Mail folders and preference files on the new Mac, then copy everything across from the old Mac and start again. As with iTunes, having a backup of all these hidden folders and files from your old Mac might be a wise investment.
If you poke around in the hidden ~/Library/, ~/Library/Application Support/ and ~Library/Preferences folders you'll find the settings files for all the applications installed on your Mac. Personally I'd take a conservative approach and do a little research before you tinker, only migrating the applications that would be a major hassle to reconfigure from scratch. Just make sure you don't wipe anything from your old Mac until you're sure everything has gone smoothly. Even then, hang onto those backup files for safekeeping.
Sign up for Computerworld eNewsletters.