I have an imac running OSX 10.6.8 on which Mail for Mac 4.6 is installed. I use this app to access my .mac account - this being a MobileMe IMAP account. Since midday today I have been unable to access my inbox or send mail - I am repeatedly told my password is wrong. I have repeatedly reentered my password to no avail. I am able to access my account through iCloud (web based) using my usual password, so clearly I know the password and am not entering it wrongly in Mail. I have checked all the other IMAP and STMP settings - they are correct. I am also able to access the account through my father's iPad - but have had to set up 2 factor authentication for this to happen. I am wondering if I need 2 factor to access from Mail - but cannot find any way of generating or entering such a password. Help!
You need to set up an app-specific password, which is now mandatory on anything connecting to iCloud that doesn't support 2FA. See Apple's current instructions here, but they may change over time and so shouldn't be included in an answer.
If the link no longer works, search for "icloud app-specific password".
You will need to set up two-step (not two-factor, which your iMac doesn't support) authentication on your iCloud account.