Sometimes, your mailbox database does not visually reflect reality. If you have a situation like a deleted message still appearing in your Apple Mail account, you will probably see an error message. A database is a binary blob of information, so it may need to be updated via a rescan from time to time. In the Apple Mail app, select the particular mailbox in the sidebar, then choose "Mailbox" and "Rebuild" afterward. Your mailbox may appear empty until the attachments/messages are all downloaded back to your device.