found solution for Mail IMAP problem
I found the answer on another
site, (I googled "mail has undone actions on some") basically the answer is:
-----< cut and pasted w/o permission >--------
In Leopard, when you go offline while using Apples Mail program with an IMAP account, you may get the following error message, or something similar:
Some actions taken while the account xxxxxxx was offline could not be completed online.
Mail has undone actions on some messages so that you can redo the actions while online. Mail has saved other messages in mailbox Apple Mail To Do in On My Mac so that you can complete the actions while online.
Additional information: The IMAP command APPEND (to Apple Mail To Do) failed with server error: Invalid mailbox name..
And if you click OK enough times, the program crashes.
There are two ways to correct this problem (both ways will preserve your mail settings (you will NOT have to reconfigure your Mail program) and your mail will appear in a few seconds after first opening the Mail program after performing the fix below):
1st Way (easier way)
1. Make sure your Mail program is closed
2. Open Macintosh HD (double-click on it)
3. Select your Home folder (it will be on left nav bar with the picture of a house)
4. On the right side of the window, double-click on the Library folder (to open the folder)
5. Double-click on the Mail folder
6. Remove (move to the trash) the IMAP-youremailaddress@here.com folder
7. Close everything and open Mail to confirm it has been fixed
2nd Way
Delete all entries in~/Library/Mail/IMAP-email_address@mailserver/.OfflineCache . The folder is actually only accessible in shell since its a hidden directory, so you will need to access it via Terminal. This is for advanced users only, so I wont bother writing a step-by-step instruction, as those users will know how to do it.
-----< end of cut and paste w/o permission >--------
please see the original site and the kudos that follow.