If you’ve recently updated to iCloud from MobileMe, and you try to send an email from inside iPhoto, you may get a message that says, “The email server didn’t recognize your username/password combination.”
To fix it, go to iPhoto>Preferences, then click on Accounts. Delete the old MobileMe account, and add your new iCloud account (even if the username and password are the same). Then, delete the old account.
If you didn’t have MobileMe, you can just go in and edit the account you DO have to make sure the information is correct.