Make sure the password is using clear/normal text. Spa, APOP, etc don't work.
Many versions of APPLE require a complete shutdown and restart of the computer/device.
Check some of the threads on Thunderbird, where people, including me, posted screen shots of the settings.